happy-opfs
    Preparing search index...

    Function statSync

    • Synchronous version of stat. Retrieves metadata about a file or directory.

      Note: Returns FileSystemHandleLike instead of FileSystemHandle because native FileSystemHandle objects cannot be serialized across threads. FileSystemHandleLike is a plain object with name and kind properties. For file entries, it also includes size, type, and lastModified - use isFileHandleLike() to check and narrow the type.

      Parameters

      • path: string

        The absolute path to get status for.

      Returns IOResult<FileSystemHandleLike>

      An IOResult containing a FileSystemHandleLike object.

      stat for the async version.

      1.1.0

      statSync('/path/to/entry')
      .inspect(handle => console.log(`Kind: ${ handle.kind }, Name: ${ handle.name }`));