Represents FsClient implementation which uses File System Access API under the hood for persistent storage. Meant to be used in a browser environment.

Limitations

  • Symlinks are not supported
  • Partial support for statistics returned by stat or lstat methods: size and mtimeMs are only supported and only for files
  • Poor browser support:
    • Chromium - full support
    • WebKit - partial support, could be supported in the Worker thread after some modifications here
    • Firefox - is not supported

See

Example

const root = await navigator.storage.getDirectory()
const reposRoot = await root.getDirectoryHandle('repos', { create: true })
const fs = new FileSystemAccessApiFsClient(reposRoot)

Hierarchy

  • FileSystemAccessApiFsClient

Implements

Constructors

Methods

  • Return true if a entry exists, false if it doesn't exist. Rethrows errors that aren't related to entry existance.

    Parameters

    • path: string

    Returns Promise<boolean>

Generated using TypeDoc