Mounts an Emscripten file system into the BrowserFS file system.

Hierarchy

  • ExtractProperties<FileSystem, ((...args: any[]) => Promise<unknown>)> & FileSystem<this>
    • EmscriptenFS

Constructors

Properties

_disableSync?: boolean

Whether the sync cache should be disabled. Only affects async things.

em: typeof FS

The Emscripten FS

Methods

  • Parameters

    • path: string
    • mode: number

    Returns void

  • Parameters

    • path: string
    • new_uid: number
    • new_gid: number

    Returns void

  • Create the file at path with the given mode. Then, open it with the given flag.

    Parameters

    • path: string
    • flag: string
    • mode: number

    Returns Promise<File>

  • Create the file at path with the given mode. Then, open it with the given flag.

    Parameters

    • path: string

    Returns EmscriptenFile

  • Test whether or not the given path exists.

    Parameters

    • path: string

    Returns Promise<boolean>

  • Test whether or not the given path exists.

    Parameters

    • path: string

    Returns boolean

  • Asynchronous link.

    Parameters

    • target: string
    • link: string

    Returns Promise<void>

  • Right now this method is just a mask for symlinks

    Parameters

    • srcpath: string
    • dstpath: string

    Returns void

    track hard links

  • Get metadata about the current file system

    Returns FileSystemMetadata

  • Asynchronous mkdir.

    Parameters

    • path: string
    • mode: number

      Mode to make the directory using.

    Returns Promise<void>

  • Synchronous mkdir.

    Parameters

    • path: string
    • mode: number

      Mode to make the directory using.

    Returns void

  • Opens the file at path with the given flag. The file must exist.

    Parameters

    • path: string

      The path to open.

    • flag: string

      The flag to use when opening the file.

    Returns Promise<File>

  • Opens the file at path with the given flag. The file must exist.

    Parameters

    • path: string

      The path to open.

    • flag: string

      The flag to use when opening the file.

    Returns EmscriptenFile

    A File object corresponding to the opened file.

  • Asynchronous readdir. Reads the contents of a directory.

    Parameters

    • path: string

    Returns Promise<string[]>

  • Synchronous readdir. Reads the contents of a directory.

    Parameters

    • path: string

    Returns string[]

  • Parameters

    • path: string

    Returns string

  • Returns Promise<void>

  • Asynchronous rename.

    Parameters

    • oldPath: string
    • newPath: string

    Returns Promise<void>

  • Synchronous rename.

    Parameters

    • oldPath: string
    • newPath: string

    Returns void

  • Asynchronous rmdir.

    Parameters

    • path: string

    Returns Promise<void>

  • Synchronous rmdir.

    Parameters

    • path: string

    Returns void

  • Asynchronous stat.

    Parameters

    • path: string

    Returns Promise<Stats>

  • Synchronous stat.

    Parameters

    • path: string

    Returns Stats

  • Parameters

    • srcpath: string
    • dstpath: string

    Returns void

  • Synchronize the data and stats for path asynchronously

    Parameters

    • path: string
    • data: Uint8Array
    • stats: Readonly<Stats>

    Returns Promise<void>

  • Synchronize the data and stats for path synchronously

    Parameters

    • path: string
    • data: Uint8Array
    • stats: Readonly<Stats>

    Returns void

  • Parameters

    • path: string
    • len: number

    Returns void

  • Asynchronous unlink.

    Parameters

    • path: string

    Returns Promise<void>

  • Synchronous unlink.

    Parameters

    • path: string

    Returns void

  • Parameters

    • path: string
    • atime: Date
    • mtime: Date

    Returns void