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.
Members
Section titled “Members”atime: Date | nullThe 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
Section titled “birthtime”birthtime: Date | nullThe 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
Section titled “blksize”blksize: number | nullBlocksize for filesystem I/O.
Platform-specific
Section titled “Platform-specific”- Windows: Unsupported.
blocks
Section titled “blocks”blocks: number | nullNumber of blocks allocated to the file, in 512-byte units.
Platform-specific
Section titled “Platform-specific”- Windows: Unsupported.
dev: number | nullID of the device containing the file.
Platform-specific
Section titled “Platform-specific”- Windows: Unsupported.
fileAttributes
Section titled “fileAttributes”fileAttributes: number | nullThis 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
Platform-specific
Section titled “Platform-specific”- macOS / Linux / Android / iOS: Unsupported.
gid: number | nullGroup ID of the owner of this file.
Platform-specific
Section titled “Platform-specific”- Windows: Unsupported.
ino: number | nullInode number.
Platform-specific
Section titled “Platform-specific”- Windows: Unsupported.
isDirectory
Section titled “isDirectory”isDirectory: booleanTrue if this is info for a regular directory. Mutually exclusive to
FileInfo.isFile and FileInfo.isSymlink.
isFile
Section titled “isFile”isFile: booleanTrue if this is info for a regular file. Mutually exclusive to
FileInfo.isDirectory and FileInfo.isSymlink.
isSymlink
Section titled “isSymlink”isSymlink: booleanTrue if this is info for a symlink. Mutually exclusive to
FileInfo.isFile and FileInfo.isDirectory.
mode: number | nullThe underlying raw st_mode bits that contain the standard Unix
permissions for this file/directory.
Platform-specific
Section titled “Platform-specific”- Windows: Unsupported.
mtime: Date | nullThe 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 | nullNumber of hard links pointing to this file.
Platform-specific
Section titled “Platform-specific”- Windows: Unsupported.
rdev: number | nullDevice ID of this file.
Platform-specific
Section titled “Platform-specific”- Windows: Unsupported.
readonly
Section titled “readonly”readonly: booleanWhether this is a readonly (unwritable) file.
size: numberThe size of the file, in bytes.
uid: number | nullUser ID of the owner of this file.
Platform-specific
Section titled “Platform-specific”- 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.