Checks if the application has execute permissions for the given path.
The path to check.
true
if the file is executable, false
otherwise.
Copies a file from a source path to a destination path.
The source file path.
The destination file path.
Creates a new, empty file at the specified path.
The path where the new file should be created.
true
if the file was created, false
if it already exists or an error occurred.
Checks if a file or directory exists at the given path.
The path to check.
true
if the path exists, false
otherwise.
Checks if the given path points to a block device.
The path to check.
true
if the path is a block device, false
otherwise.
Checks if the given path points to a character device.
The path to check.
true
if the path is a character device, false
otherwise.
Checks if the given path points to a directory.
The path to check.
true
if the path is a directory, false
otherwise.
Checks if the given path points to a regular file.
The path to check.
true
if the path is a file, false
otherwise.
Checks if the file or directory at the given path is hidden.
The path to check.
true
if the path is hidden, false
otherwise.
Checks if the given path points to a named pipe (FIFO).
The path to check.
true
if the path is a named pipe, false
otherwise.
Checks if the given path points to a socket.
The path to check.
true
if the path is a socket, false
otherwise.
Checks if the given path points to a symbolic link.
The path to check.
true
if the path is a symbolic link, false
otherwise.
Lists the files and directories in a given path.
The path of the directory to list.
A string containing the names of the items in the directory,
or null
if the path is not a directory or an error occurs.
Creates a directory, including any necessary but non-existent parent directories.
The path of the directory to create.
true
if the directories were created, false
otherwise.
Creates a new directory. Fails if the parent directory does not exist.
The path of the directory to create.
true
if the directory was created, false
otherwise.
Creates a new FileSystemInstance for a given path. This instance can then be used to perform operations on that specific file or directory.
The absolute path to the file or directory.
A new instance representing the path,
or null
if the path is invalid or inaccessible.
Reads the entire content of a file at a given path as a UTF-8 string.
The path to the file to read.
The content of the file as a string, or null
if
the file does not exist or cannot be read.
Renames or moves a file or directory.
The original path.
The new path.
true
if the operation was successful, false
otherwise.
Removes a file or an empty directory at the given path.
The path to remove.
true
if the removal was successful, false
otherwise.
Returns the size of the file at the given path in bytes.
The path to the file.
The size of the file in bytes, or null
if it doesn't exist or is a directory.
Retrieves file status information, typically the last modification time as a Unix timestamp.
The path to the file or directory.
The last modification time (e.g., in milliseconds since epoch),
or null
if the path does not exist.
Writes a string to a file at a given path, overwriting the file if it exists.
The path to the file to write to.
The string content to write to the file.
Returns null
if the operation fails.
Defines a static-like interface for synchronous file system operations. This interface provides a direct way to interact with the file system from a sandboxed environment, like a WebView. All operations are synchronous and will block execution until they complete. It serves as a factory for creating FileSystemInstance objects and for performing operations on paths directly.