Index
  • Parameters

    • storage: StorageProvider
    • sources: {
          fetch?: (url: string, init?: RequestInit) => Promise<Response>;
          initfs?: string | false;
          key?: (key: string) => string;
      } = {}

      initfs overrides where the initfs tarball is (false installs none); fetch is what reads it

    Returns Filesystem

  • Configures the filesystem with the given options.

    Parameters

    • options: Partial<Configuration<ConfigMounts>>

      The options for the filesystem.

    Returns Promise<void>

    A promise that resolves when the filesystem is configured.

  • Recursively copies every file and directory under source to destination, both mounted paths (possibly on different backends). The primitive for moving a filesystem's contents onto another backend; there is no automatic root swap, since root= is not parsed.

    Parameters

    • source: string
    • destination: string

    Returns Promise<number>

    the number of files copied (directories are not counted)

  • Parameters

    • Optionalt: TFunction<"translation", undefined> | ((key: string) => string)

    Returns Map<string, string>

  • Checks if a file or directory exists at the given path.

    Parameters

    • path: string

      The path to check.

    Returns Promise<boolean>

    A promise that resolves to true if the path exists, false otherwise.

    A shortcut for kernel.filesystem.fs.exists

  • Extracts a tarball to the given path.

    Parameters

    • tarballPath: string

      The path to the tarball.

    • extractPath: string

      The path to extract the tarball to.

    • fileMode: number = 0o644

      The mode to set for files. Defaults to 0o644.

    • directoryMode: number = 0o755

      The mode to set for directories. Defaults to 0o755.

    • Optionalfilter: (name: string) => boolean

    Returns Promise<void>

    A promise that resolves when the tarball is extracted.