ZenFS
    Preparing search index...

    Interface ConcreteFSInternal

    Concrete FileSystem. This is a convenience type.

    interface ConcreteFS {
        _mountPoint?: string;
        _uuid: `${string}-${string}-${string}-${string}-${string}`;
        attributes: ConstMap<
            FileSystemAttributes,
            keyof FileSystemAttributes,
            undefined
            | void
            | CaseFold,
        > & Map<string, any>;
        label?: string;
        name: string;
        type: number;
        uuid: `${string}-${string}-${string}-${string}-${string}`;
        createFile(path: string, options: CreationOptions): Promise<InodeLike>;
        createFileSync(path: string, options: CreationOptions): InodeLike;
        exists(path: string): Promise<boolean>;
        existsSync(path: string): boolean;
        link(target: string, link: string): Promise<void>;
        linkSync(target: string, link: string): void;
        mkdir(path: string, options: CreationOptions): Promise<InodeLike>;
        mkdirSync(path: string, options: CreationOptions): InodeLike;
        read(
            path: string,
            buffer: Uint8Array,
            start: number,
            end: number,
        ): Promise<void>;
        readdir(path: string): Promise<string[]>;
        readdirSync(path: string): string[];
        readSync(
            path: string,
            buffer: Uint8Array,
            start: number,
            end: number,
        ): void;
        ready(): Promise<void>;
        rename(oldPath: string, newPath: string): Promise<void>;
        renameSync(oldPath: string, newPath: string): void;
        rmdir(path: string): Promise<void>;
        rmdirSync(path: string): void;
        stat(path: string): Promise<InodeLike>;
        statSync(path: string): InodeLike;
        streamRead(path: string, options: StreamOptions): ReadableStream;
        streamWrite(path: string, options: StreamOptions): WritableStream;
        sync(): Promise<void>;
        syncSync(): void;
        toString(): string;
        touch(path: string, metadata: Partial<InodeLike>): Promise<void>;
        touchSync(path: string, metadata: Partial<InodeLike>): void;
        unlink(path: string): Promise<void>;
        unlinkSync(path: string): void;
        usage(): UsageInfo;
        write(path: string, buffer: Uint8Array, offset: number): Promise<void>;
        writeSync(path: string, buffer: Uint8Array, offset: number): void;
    }

    Hierarchy

    Index

    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

    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

    uuid: `${string}-${string}-${string}-${string}-${string}`

    Methods

    • 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>

    • Parameters

      • target: string
      • link: string

      Returns 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

      • 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!

      • start: 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 Promise<void>

    • Parameters

      • oldPath: string
      • newPath: string

      Returns void

    • Parameters

      • path: string

      Returns Promise<void>

    • Parameters

      • path: 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>

    • 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