Ende.FileInfo

interface

interface Ende.FileInfo

Provides information about a file and is returned by Ende.stat, Ende.lstat, Ende.statSync, and Ende.lstatSync or from calling stat() and statSync() on an Ende.FsFile instance.

Properties

isFile

isFile: boolean

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

isDirectory

isDirectory: boolean

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

isSymlink: boolean

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

size

size: number

The size of the file, in bytes.

mtime

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.

atime

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

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.

ctime

ctime: Date | null

The last change time of the file. This corresponds to the ctime field from stat on Mac/BSD and ChangeTime on Windows. This may not be available on all platforms.

dev

dev: number

ID of the device containing the file.

ino

ino: number | null

Corresponds to the inode number on Unix systems. On Windows, this is the file index number that is unique within a volume. This may not be available on all platforms.

mode

mode: number | null

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

nlink: number | null

Number of hard links pointing to this file.

uid

uid: number | null

User ID of the owner of this file.

Linux/Mac OS only.

gid

gid: number | null

Group ID of the owner of this file.

Linux/Mac OS only.

rdev

rdev: number | null

Device ID of this file.

Linux/Mac OS only.

blksize

blksize: number | null

Blocksize for filesystem I/O.

Linux/Mac OS only.

blocks

blocks: number | null

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

isBlockDevice

isBlockDevice: boolean | null

True if this is info for a block device.

Linux/Mac OS only.

isCharDevice

isCharDevice: boolean | null

True if this is info for a char device.

Linux/Mac OS only.

isFifo

isFifo: boolean | null

True if this is info for a fifo.

Linux/Mac OS only.

isSocket

isSocket: boolean | null

True if this is info for a socket.

Linux/Mac OS only.