ZenFS
    Preparing search index...

    Interface AsyncFSMethodsInternal

    Asynchronous FileSystem methods. This is a convenience type for all of the async operations.

    interface AsyncFSMethods {
        createFile(path: string, options: CreationOptions): Promise<InodeLike>;
        exists(path: string): Promise<boolean>;
        link(target: string, link: string): Promise<void>;
        mkdir(path: string, options: CreationOptions): Promise<InodeLike>;
        read(
            path: string,
            buffer: Uint8Array,
            start: number,
            end: number,
        ): Promise<void>;
        readdir(path: string): Promise<string[]>;
        rename(oldPath: string, newPath: string): Promise<void>;
        rmdir(path: string): Promise<void>;
        stat(path: string): Promise<InodeLike>;
        sync(): Promise<void>;
        touch(path: string, metadata: Partial<InodeLike>): Promise<void>;
        unlink(path: string): Promise<void>;
        write(path: string, buffer: Uint8Array, offset: number): Promise<void>;
    }

    Hierarchy

    Index

    Methods

    • Test whether or not path exists.

      Parameters

      • path: string

      Returns Promise<boolean>

    • Parameters

      • target: string
      • link: string

      Returns Promise<void>

    • 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

      • oldPath: string
      • newPath: string

      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 Promise<void>