Extends
Classes
Methods
-
Copies a file. Implementations should override this for remote filesystems.
Name Type Description sourcePathstring The source path.
destPathstring The destination path.
Returns:
Type Description Promise The Promise object. -
Returns the directory part of the given path.
Name Type Description pathstring The path.
Returns:
Type Description string The directory part of the path. -
Encodes the given file name to be used within paths.
Some file systems require file names to be encoded and you must encode file names when composing file system paths. On file systems that do not require encoding, this method simply returns the name unchanged.
Name Type Description namestring The name to encode.
Returns:
Type Description string The encoded name. -
Checks if the given path exists and returns a boolean Promise object.
Name Type Description pathstring The path to check for.
Returns:
Type Description Promise The boolean Promise object. -
Retrieves a file info object for the given path.
A file info object is a plain dictionary object with several entries describing a file or directory.
For example:
{ path: "/etc/fstab", // the full path dir: "/etc", // the path to the parent directory name: "fstab", // the filename type: "f", // either "f" for files or "d" for directories size: 120, // the file size in bytes mimetype: "text/plain", // the MIME type of the file ctime: 1690621908, // the creation time as a Unix timestamp mtime: 1690621908 // the modification time as a Unix timestamp }Name Type Description pathstring The path.
Returns:
Type Description Promise The Promise object. -
Returns the file part of the given path.
Name Type Description pathstring The path.
Returns:
Type Description string The file part of the path. -
Lists the files at the given path and returns a Promise object with the file items.
Name Type Description pathstring The path to list.
Returns:
Type Description Promise The Promise object. -
Returns a FileData object for the given data source.
Name Type Description dataSourcestring | ArrayBuffer | ReadableStream | Blob | FileInfo The data source.
Returns:
Type Description core.FileData The FileData object. -
Creates a new directory at the given path.
Name Type Description pathstring The path where to create a new directory.
namestring The name of the new directory.
Returns:
Type Description Promise The Promise object. -
Creates a hierarchy of directories.
Name Type Description pathstring The hierarchy of directories to create.
Returns:
Type Description Promise The Promise object. -
Moves a file.
Name Type Description sourcePathstring The source path.
destPathstring The destination path.
Returns:
Type Description Promise The Promise object. -
Normalizes the given path.
Name Type Description pathstring The path to normalize.
Returns:
Type Description string The normalized path. -
Joins a list of path components.
All path components must be encoded (@see core.Filesystem#encodeName).
Name Type Description argsArray.<string> repeatable The path components.
Returns:
Type Description string - The resulting path.
-
Reads the file at the given path and returns a Promise object with the Blob.
Name Type Description pathstring The path of the file to read.
progressCallbackfunction An optional progress callback, if supported by the implementation.
Returns:
Type Description Promise - The Promise object with the file's contents as core.Filesystem.FileData.
-
Removes the given path.
Name Type Description pathstring The path to remove.
Returns:
Type Description Promise The Promise object. -
Searches for files matching a query and returns a Promise object with the file items. The format of the query string is defined by the particular implementation.
Name Type Description pathstring The path to search.
querystring The search query.
Returns:
Type Description Promise The Promise object. -
Writes the given Blob to the given path.
Name Type Description pathstring The path of the file to write.
fileDatacore.Filesystem.FileData The data to write.
progressCallbackfunction An optional progress callback, if supported by the implementation.
Returns:
Type Description Promise The Promise object.