Interface AsyncMixinInternal

interface AsyncMixin {
    _sync?: FileSystem;
    createFileSync(
        path: string,
        flag: string,
        mode: number,
        options: CreationOptions,
    ): File<FileSystem>;
    linkSync(target: string, link: string): void;
    mkdirSync(path: string, mode: number, options: CreationOptions): void;
    openFileSync(path: string, flag: string): File<FileSystem>;
    queueDone(): Promise<void>;
    readdirSync(path: string): string[];
    readSync(
        path: string,
        buffer: Uint8Array<ArrayBufferLike>,
        offset: number,
        end: number,
    ): void;
    ready(): Promise<void>;
    renameSync(oldPath: string, newPath: string): void;
    rmdirSync(path: string): void;
    statSync(path: string): Stats;
    syncSync(
        path: string,
        data?: Uint8Array<ArrayBufferLike>,
        stats?: Readonly<Partial<StatsLike<number | bigint>>>,
    ): void;
    unlinkSync(path: string): void;
    writeSync(
        path: string,
        buffer: Uint8Array<ArrayBufferLike>,
        offset: number,
    ): void;
}

Hierarchy

  • Pick<FileSystem, Exclude<_SyncFSKeys, "existsSync">>
    • AsyncMixin

Properties

_sync?: FileSystem

Methods

  • Parameters

    • target: string
    • link: string

    Returns void

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

    Parameters

    • path: string

      The path to open.

    • flag: string

      The flag to use when opening the file.

    Returns File<FileSystem>

  • Parameters

    • path: string

    Returns string[]

  • Reads into a buffer

    Parameters

    • path: string
    • buffer: Uint8Array<ArrayBufferLike>

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

    • offset: number

      The offset into the file to start reading from

    • end: number

      The position in the file to stop reading

    Returns void

  • Parameters

    • oldPath: string
    • newPath: string

    Returns void

  • Parameters

    • path: string

    Returns void

  • Parameters

    • path: string
    • Optionaldata: Uint8Array<ArrayBufferLike>
    • Optionalstats: Readonly<Partial<StatsLike<number | bigint>>>

    Returns void

  • Parameters

    • path: string

    Returns void

  • Writes a buffer to a file

    Parameters

    • path: string
    • buffer: Uint8Array<ArrayBufferLike>

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

    • offset: number

      The offset in the file to start writing

    Returns void