- public static bool appendText (Path path, string text)
Appends a string to the end of a file. Creates the file if it does not
exist.
- public static bool canExec (Path path)
Returns whether the file can execute in the specified path.
- public static bool canRead (Path path)
Returns whether the file can read in the specified path.
- public static bool canWrite (Path path)
Returns whether the file can write in the specified path.
- public static bool chmod (Path path, int mode)
Changes the file mode (permissions) of the specified path.
- public static bool chown (Path path, int uid, int gid)
Changes the owner and group of the specified path.
- public static bool copy (Path src, Path dst)
Copies a file from source to destination.
- public static bool createSymlink (Path target, Path link)
Creates a symbolic link that points to the target path.
- public static bool deleteRecursive (Path path)
Recursively deletes a directory and all its contents.
- public static bool exists (Path path)
Returns whether the file or directory exists in the specified path.
- public static List<Path>? glob (Path dir, string pattern)
Returns a list of file paths in the directory that match the given
glob pattern.
- public static bool isDir (Path path)
Returns whether the directory exists in the specified path.
- public static bool isFile (Path path)
Returns whether the file exists in the specified path.
- public static bool isHiddenFile (Path path)
Returns whether the hidden file exists in the specified path.
- public static bool isSameFile (Path a, Path b)
Returns whether two paths refer to the same file on disk.
- public static bool isSymbolicFile (Path path)
Returns whether the symbolic file exists in the specified path.
- public static DateTime? lastModified (Path path)
Returns the last modification time of a file or directory.
- public static List<string>? listDir (Path path)
Lists the entries in a directory.
- public static bool makeDirs (Path path)
Create a directory including the parent directory.
- public static bool move (Path src, Path dst)
Moves (renames) a file from source to destination.
- public static List<string>? readAllLines (Path path)
Reads the entire contents of a file as a list of lines.
- public static string? readAllText (Path path)
Reads the entire contents of a file as a string.
- public static uint8[]? readBytes (Path path)
Reads the entire contents of a file as a byte array.
- public static Path? readSymlink (Path path)
Reads the target path of a symbolic link.
- public static bool remove (Path path)
Deletes a file or empty directory.
- public static int64 size (Path path)
Returns the size of a file in bytes.
- public static Path? tempDir (string prefix)
Creates a temporary directory and returns its path.
- public static Path? tempFile (string prefix, string suffix)
Creates a temporary file and returns its path.
- public static bool touch (Path path)
Creates a file if it does not exist, or updates its modification time
if it does.
- public static bool writeBytes (Path path, uint8[] data)
Writes a byte array to a file, replacing any existing content.
- public static bool writeText (Path path, string text)
Writes a string to a file, replacing any existing content.