fs
Filesystem utilities.
This module provides filesystem object and directory operations.
Types
_None._
Functions
exists(path: String) -> bool
Return whether a filesystem path exists.
Parameters
path: String- Filesystem path.
Returns
trueif the path exists, otherwisefalse.
---
is_file(path: String) -> bool
Return whether a filesystem path refers to a regular file.
Parameters
path: String- Filesystem path.
Returns
trueonly for regular files.
---
is_dir(path: String) -> bool
Return whether a filesystem path refers to a directory.
Parameters
path: String- Filesystem path.
Returns
trueonly for directories.
---
throws mkdir(path: String) -> void
Create a directory.
Behavior
- Throws on failure.
Parameters
path: String- Directory path.
---
throws mkdir_all(path: String) -> void
Create a directory path and any missing parents.
Behavior
- Throws on failure.
Parameters
path: String- Directory path.
---
throws remove_file(path: String) -> void
Remove a file.
Behavior
- Throws on failure.
Parameters
path: String- File path.
---
throws remove_dir(path: String) -> void
Remove an empty directory.
Behavior
- Throws on failure.
Parameters
path: String- Directory path.
---
throws remove_dir_all(path: String) -> void
Remove a directory tree recursively.
Behavior
- Throws on failure.
Parameters
path: String- Directory path.
Notes
- Implemented in Jik by composing
read_dir, predicates, and removal primitives. - Symlink-specific behavior is not guaranteed in v1.
---
throws rename(foreign old_path: String, foreign new_path: String) -> void
Rename or move a filesystem object.
Behavior
- Throws on failure.
Parameters
foreign old_path: String- Source path.foreign new_path: String- Destination path.
---
throws copy_file(foreign src_path: String, foreign dst_path: String) -> void
Copy a file.
Behavior
- Throws on failure.
Parameters
foreign src_path: String- Source path.foreign dst_path: String- Destination path.
---
throws read_dir(foreign path: String, region: Region) -> Vec[String]
Return the names of entries directly inside a directory.
Behavior
- Throws on failure.
Parameters
foreign path: String- Directory path.region: Region- Allocation region for the returned vector and strings.
Returns
- Directory entry names.
Notes
- Entry names are returned without directory prefixes.
- Entry ordering is platform-dependent.
---
temp_dir(region: Region) -> String
Return the platform temporary directory path.
Parameters
region: Region- Allocation region for the returned string.
Returns
- Temporary directory path.