콘텐츠로 이동

FileInfo

이 콘텐츠는 아직 번역되지 않았습니다.

Module @netwiv/api/plugins/fs · Kind Interface

import { FileInfo } from '@netwiv/api/plugins/fs';

A FileInfo describes a file and is returned by stat, lstat or fstat.

atime: Date | null

The last access time of the file. This corresponds to the atime field from stat on Unix and ftLastAccessTime on Windows. This may not be available on all platforms.

birthtime: Date | null

The creation time of the file. This corresponds to the birthtime field from stat on Mac/BSD and ftCreationTime on Windows. This may not be available on all platforms.

blksize: number | null

Blocksize for filesystem I/O.

  • Windows: Unsupported.
blocks: number | null

Number of blocks allocated to the file, in 512-byte units.

  • Windows: Unsupported.
dev: number | null

ID of the device containing the file.

  • Windows: Unsupported.
fileAttributes: number | null

This field contains the file system attribute information for a file or directory. For possible values and their descriptions, see {@link https://docs.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants File Attribute Constants} in the Windows Dev Center

  • macOS / Linux / Android / iOS: Unsupported.
gid: number | null

Group ID of the owner of this file.

  • Windows: Unsupported.
ino: number | null

Inode number.

  • Windows: Unsupported.
isDirectory: boolean

True if this is info for a regular directory. Mutually exclusive to FileInfo.isFile and FileInfo.isSymlink.

isFile: boolean

True if this is info for a regular file. Mutually exclusive to FileInfo.isDirectory and FileInfo.isSymlink.

isSymlink: boolean

True if this is info for a symlink. Mutually exclusive to FileInfo.isFile and FileInfo.isDirectory.

mode: number | null

The underlying raw st_mode bits that contain the standard Unix permissions for this file/directory.

  • Windows: Unsupported.
mtime: Date | null

The last modification time of the file. This corresponds to the mtime field from stat on Linux/Mac OS and ftLastWriteTime on Windows. This may not be available on all platforms.

nlink: number | null

Number of hard links pointing to this file.

  • Windows: Unsupported.
rdev: number | null

Device ID of this file.

  • Windows: Unsupported.
readonly: boolean

Whether this is a readonly (unwritable) file.

size: number

The size of the file, in bytes.

uid: number | null

User ID of the owner of this file.

  • Windows: Unsupported.

Upstream since 2.0.0


Descriptions come from the pinned @tauri-apps/plugin-fs@2.5.2 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.