FS

2/1/2024 - 2:44:47 AM

FS

Constructors

Properties

_items: FSItems
_uuidToItem: Record<string, FSItemUUID>

Methods

  • Add an item to the internal item tree.

    Parameters

    • param0: { item: FSItem; path: string }

    Returns Promise<void>

  • Remove an item from the internal item tree.

    Parameters

    • param0: { path: string }

    Returns Promise<void>

  • Alias of cp.

    Parameters

    • ...params: [
          {
              abortSignal?: AbortSignal;
              from: string;
              onProgress?: ProgressCallback;
              onProgressId?: string;
              pauseSignal?: PauseSignal;
              to: string;
          },
      ]

    Returns Promise<void>

    2/14/2024 - 5:07:27 AM

  • Copy a file or directory structure. Recursively creates intermediate directories if needed. Warning: Can be really inefficient when copying large directory structures. All files need to be downloaded first and then reuploaded due to our end to end encryption. Plain copying unfortunately does not work. Only available in a Node.JS environment.

    Parameters

    • param0: {
          abortSignal?: AbortSignal;
          from: string;
          onProgress?: ProgressCallback;
          onProgressId?: string;
          pauseSignal?: PauseSignal;
          to: string;
      }

    Returns Promise<void>

  • Download a file or directory from path to a local destination path. Only available in a Node.JS environment.

    Parameters

    • param0: {
          abortSignal?: AbortSignal;
          destination: string;
          onProgress?: ProgressCallback;
          onProgressId?: string;
          path: string;
          pauseSignal?: PauseSignal;
      }

    Returns Promise<void>

  • Alias of readdir.

    Parameters

    • ...params: [{ path: string; recursive?: boolean }]

    Returns Promise<string[]>

    2/13/2024 - 8:48:40 PM

  • Alias of stat.

    Parameters

    • ...params: [{ path: string }]

    Returns Promise<FSStats>

    2/13/2024 - 8:49:18 PM

  • Creates a directory at path. Recursively creates intermediate directories if they don't exist.

    Parameters

    • param0: { path: string }

    Returns Promise<string>

    2/14/2024 - 1:34:11 AM

  • Parameters

    • __namedParameters: { path: string; type?: FSItemType }

    Returns Promise<null | string>

  • Read a file. Returns buffer of given length, at position and offset. Memory efficient to read only a small part of a file.

    Parameters

    • param0: {
          abortSignal?: AbortSignal;
          length?: number;
          offset?: number;
          onProgress?: ProgressCallback;
          onProgressId?: string;
          path: string;
          pauseSignal?: PauseSignal;
          position?: number;
      }

    Returns Promise<Buffer>

  • List files and directories at path.

    Parameters

    • param0: { path: string; recursive?: boolean }

    Returns Promise<string[]>

    2/20/2024 - 2:40:03 AM

  • Read a file at path. Warning: This reads the whole file into memory and can be pretty inefficient.

    Parameters

    • param0: {
          abortSignal?: AbortSignal;
          onProgress?: ProgressCallback;
          onProgressId?: string;
          path: string;
          pauseSignal?: PauseSignal;
      }

    Returns Promise<Buffer>

  • Rename or move a file/directory. Recursively creates intermediate directories if needed.

    Parameters

    • param0: { from: string; to: string }

    Returns Promise<void>

    2/14/2024 - 1:39:32 AM

  • Alias of unlink.

    Parameters

    • param0: { path: string; permanent?: boolean }

    Returns Promise<void>

    2/28/2024 - 4:58:30 PM

  • Deletes directory at path.

    Parameters

    • ...params: [{ path: string; permanent?: boolean }]

    Returns Promise<void>

    2/14/2024 - 2:53:48 AM

  • Deletes a file at path.

    Parameters

    • ...params: [{ path: string; permanent?: boolean }]

    Returns Promise<void>

  • Deletes file/directory at path.

    Parameters

    • param0: { path: string; permanent?: boolean }

    Returns Promise<void>

    2/28/2024 - 4:58:37 PM

  • Upload file or directory to path from a local source path. Recursively creates intermediate directories if needed. Only available in a Node.JS environment.

    Parameters

    • param0: {
          abortSignal?: AbortSignal;
          onProgress?: ProgressCallback;
          onProgressId?: string;
          overwriteDirectory?: boolean;
          path: string;
          pauseSignal?: PauseSignal;
          source: string;
      }

    Returns Promise<CloudItem>

  • Alias of writeFile.

    Parameters

    • ...params: [
          {
              abortSignal?: AbortSignal;
              content: Buffer;
              encryptionKey?: string;
              onProgress?: ProgressCallback;
              onProgressId?: string;
              path: string;
              pauseSignal?: PauseSignal;
          },
      ]

    Returns Promise<CloudItem>

    2/20/2024 - 9:45:40 PM

  • Write to a file. Warning: This reads the whole file into memory and can be very inefficient. Only available in a Node.JS environment.

    Parameters

    • param0: {
          abortSignal?: AbortSignal;
          content: Buffer;
          encryptionKey?: string;
          onProgress?: ProgressCallback;
          onProgressId?: string;
          path: string;
          pauseSignal?: PauseSignal;
      }

    Returns Promise<CloudItem>

MMNEPVFCICPMFPCPTTAAATR