ZenFS Emscripten
    Preparing search index...

    Class EmscriptenFS

    Mounts an Emscripten file system into the ZenFS file system.

    Hierarchy

    • AsyncFSMethods<this> & FileSystem<this>
      • EmscriptenFS
    Index

    Constructors

    Properties

    _mountPoint?: string

    The last place this file system was mounted

    _uuid: `${string}-${string}-${string}-${string}-${string}`

    The UUID of the file system.

    attributes: ConstMap<
        FileSystemAttributes,
        keyof FileSystemAttributes,
        undefined
        | void
        | CaseFold,
    > & Map<string, any>

    FileSystemAttributes

    em: typeof FS

    The Emscripten FS

    label?: string
    name: string

    The name for this file system. For example, tmpfs for an in memory one

    type: number

    A unique ID for this kind of file system. Currently unused internally, but could be used for partition tables or something

    Accessors

    • get uuid(): `${string}-${string}-${string}-${string}-${string}`

      Returns `${string}-${string}-${string}-${string}-${string}`

    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 options.

      Parameters

      • path: string
      • options: CreationOptions

      Returns Promise<InodeLike>

    • Create the file at path with the given options.

      Parameters

      • path: string
      • options: CreationOptions

      Returns Inode

    • Test whether or not path exists.

      Parameters

      • path: string

      Returns Promise<boolean>

    • Test whether or not path exists.

      Parameters

      • path: string

      Returns boolean

    • 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

    • Parameters

      • path: string
      • options: CreationOptions

      Returns Promise<InodeLike>

    • Parameters

      • path: string
      • options: CreationOptions

      Returns Inode

    • Reads into a buffer

      Parameters

      • path: string
      • buffer: Uint8Array

        The buffer to read into. You must set the byteOffset and byteLength appropriately!

      • start: number

        The offset into the file to start reading from

      • end: number

        The position in the file to stop reading

      Returns Promise<void>

    • Parameters

      • path: string

      Returns Promise<string[]>

    • Parameters

      • path: string

      Returns string[]

    • Parameters

      • path: string

      Returns string

    • Reads into a buffer

      Parameters

      • path: string
      • buffer: Uint8Array

        The buffer to read into. You must set the byteOffset and byteLength appropriately!

      • offset: number
      • end: number

        The position in the file to stop reading

      Returns void

    • Returns Promise<void>

    • Parameters

      • oldPath: string
      • newPath: string

      Returns Promise<void>

    • Parameters

      • oldPath: string
      • newPath: string

      Returns void

    • Parameters

      • path: string

      Returns Promise<void>

    • Parameters

      • path: string

      Returns void

    • Parameters

      • path: string

      Returns Promise<InodeLike>

    • Parameters

      • path: string

      Returns Inode

    • Read a file using a stream.

      Parameters

      • path: string
      • options: StreamOptions

      Returns ReadableStream

    • Write a file using stream.

      Parameters

      • path: string
      • options: StreamOptions

      Returns WritableStream

    • Parameters

      • srcpath: string
      • dstpath: string

      Returns void

    • Returns Promise<void>

    • Returns void

    • Returns string

    • Modify metadata.

      Parameters

      • path: string
      • metadata: Partial<InodeLike>

      Returns Promise<void>

    • Modify metadata.

      Parameters

      • path: string
      • inode: Partial<InodeLike>

      Returns void

    • Parameters

      • path: string
      • len: number

      Returns void

    • Parameters

      • path: string

      Returns Promise<void>

    • Parameters

      • path: string

      Returns void

    • Experimental

      Default implementation.

      Returns UsageInfo

      Implement

    • Parameters

      • path: string
      • atime: number
      • mtime: number

      Returns void

    • Writes a buffer to a file

      Parameters

      • path: string
      • buffer: Uint8Array

        The buffer to write. You must set the byteOffset and byteLength appropriately!

      • offset: number

        The offset in the file to start writing

      Returns Promise<void>

    • Writes a buffer to a file

      Parameters

      • path: string
      • buffer: Uint8Array

        The buffer to write. You must set the byteOffset and byteLength appropriately!

      • offset: number

        The offset in the file to start writing

      Returns void