happy-opfs
    Preparing search index...

    Interface FileSystemFileHandleLike

    Serializable version of FileSystemFileHandle with file metadata.

    Extends FileSystemHandleLike with file-specific properties that are normally obtained by calling handle.getFile() on a native FileSystemFileHandle.

    Why this type exists: To provide file metadata (size, type, lastModified) without requiring async operations. The native API requires await handle.getFile() to access these properties, but this type pre-fetches and stores them.

    When it's used:

    • Returned by statSync() for file entries
    • Used in DirEntryLike.handle when the entry is a file
    • Use isFileHandleLike() to narrow from FileSystemHandleLike
    interface FileSystemFileHandleLike {
        kind: "file";
        lastModified: number;
        name: string;
        size: number;
        type: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    kind: "file"

    The kind is always 'file' for file handles.

    lastModified: number

    The last modified timestamp in milliseconds since Unix epoch.

    name: string

    The name of the file or directory.

    size: number

    The size of the file in bytes.

    type: string

    The MIME type of the file (e.g., 'text/plain', 'image/png').