amber/deno/file_info
Types
Provides information about a file and is returned by
deno.stat_sync
and
deno.lstat_sync
or from calling
stat_sync
with a
FsFile
instance.
pub type FileInfo {
FileInfo(
is_file: Bool,
is_directory: Bool,
is_symlink: Bool,
size: Int,
mtime: Option(Date),
atime: Option(Date),
birthtime: Option(Date),
dev: Int,
ino: Option(Int),
mode: Option(Int),
nlink: Option(Int),
uid: Option(Int),
gid: Option(Int),
rdev: Option(Int),
blksize: Option(Int),
blocks: Option(Int),
is_block_device: Option(Bool),
is_char_device: Option(Bool),
is_fifo: Option(Bool),
is_socket: Option(Bool),
)
}
Constructors
-
FileInfo( is_file: Bool, is_directory: Bool, is_symlink: Bool, size: Int, mtime: Option(Date), atime: Option(Date), birthtime: Option(Date), dev: Int, ino: Option(Int), mode: Option(Int), nlink: Option(Int), uid: Option(Int), gid: Option(Int), rdev: Option(Int), blksize: Option(Int), blocks: Option(Int), is_block_device: Option(Bool), is_char_device: Option(Bool), is_fifo: Option(Bool), is_socket: Option(Bool), )
Arguments
-
is_file
True if this is info for a regular file. Mutually exclusive to
FileInfo.is_directory
andFileInfo.is_symlink
. -
is_directory
True if this is info for a regular directory. Mutually exclusive to
FileInfo.is_file
andFileInfo.is_symlink
. -
is_symlink
True if this is info for a symlink. Mutually exclusive to
FileInfo.is_file
andFileInfo.is_directory
. -
size
The size of the file, in bytes.
-
mtime
The last modification time of the file. This corresponds to the
mtime
field fromstat
on Linux/Mac OS andftLastWriteTime
on Windows. This may not be available on all platforms. -
atime
The last access time of the file. This corresponds to the
atime
field fromstat
on Unix andftLastAccessTime
on Windows. This may not be available on all platforms. -
birthtime
The creation time of the file. This corresponds to the
birthtime
field fromstat
on Mac/BSD andftCreationTime
on Windows. This may not be available on all platforms. -
dev
ID of the device containing the file.
-
ino
Inode number.
Linux/Mac OS only.
-
mode
The underlying raw
st_mode
bits that contain the standard Unix permissions for this file/directory.Linux/Mac OS only.
-
nlink
Number of hard links pointing to this file.
Linux/Mac OS only.
-
uid
User ID of the owner of this file.
Linux/Mac OS only.
-
gid
Group ID of the owner of this file.
Linux/Mac OS only.
-
rdev
Device ID of this file.
Linux/Mac OS only.
-
blksize
Blocksize for filesystem I/O.
Linux/Mac OS only.
-
blocks
Number of blocks allocated to the file, in 512-byte units.
Linux/Mac OS only.
-
is_block_device
True if this is info for a block device.
Linux/Mac OS only.
-
is_char_device
True if this is info for a char device.
Linux/Mac OS only.
-
is_fifo
True if this is info for a fifo.
Linux/Mac OS only.
-
is_socket
True if this is info for a socket.
Linux/Mac OS only.
-