A Promise resolving to the Client instance or null.
Performs a dummy upload for testing purposes.
A Promise resolving to true on success, or null if client is missing.
Deletes one file by its id, without listing anything.
A file that cannot be LISTED must still be deletable: a folder whose listing the server refuses is exactly the folder an operator most needs to clear, and a delete that resolves its id through the parent's collection cannot help there (#462).
The file's id.
Ok(true) when the file is gone, Err when the server refused.
Downloads a file from ChRIS by its ID.
The ID of the file to download.
A Promise resolving to a Buffer of the file content, or null on failure.
Moves (renames) a file in ChRIS by updating its path.
The file ID.
The target path including filename.
Promise resolving to true on success, false on failure.
A file's size as CUBE records it, without reading its bytes.
The file's id.
The size in bytes, or null when the file cannot be read or CUBE gives none.
Uploads a file to ChRIS.
The file content as a Blob.
The directory path in ChRIS to upload to.
The name of the file to create.
A Promise resolving to true on success, false on failure.
Creates a new folder in ChRIS at the specified path.
The path where the folder should be created.
A Result containing true if created, false if already exists, or Err on error.
Deletes a folder (and its contents) addressed by path, waiting until the CUBE confirms it is gone.
Deletion is asynchronous server-side (the DELETE is only accepted), so success is defined as the path no longer resolving within the timeout.
The folder's CUBE path (leading slash optional).
timeoutMs bounds the disappearance poll (default 10s).
Ok(true) when the folder is verifiably gone (or never existed), Err on failure or timeout.
Moves (renames) a folder in ChRIS by updating its path.
The current folder path.
The new folder path.
Promise resolving to true on success, false on failure.
Initializes the ChrisIO instance by creating a file browser folder.
A Promise resolving to true on success, false on failure, or null if client is missing.
Sets the storage provider for local IO operations.
The storage provider instance.
Uploads a local directory or file to ChRIS recursively.
The path on the local filesystem.
The destination path on ChRIS. For directories, follows Unix cp semantics: the source directory name is appended to remotePath.
Promise
Gets the ChRIS client instance, initializing it if necessary.