deno.fileinfo
FileInfo 用于描述 stat
, lstat
, statSync
, lstatSync
函数返回的文件信息。而 readdir
, readdirSync
返回的信息则用 FileInfo 列表来描述。
A FileInfo describes a file and is returned by stat
, lstat
, statSync
, lstatSync
.
继承关系
- FileInfo
索引
Properties
- accessed
- blksize
- blocks
- created
- dev
- gid
- ino
- isDirectory
- isFile
- isSymlink
- mode
- modified
- nlink
- rdev
- size
- uid
Properties
accessed
accessed: number | null
文件最后访问时间。 在 Linux/Mac 系统这个值是 atime
,在 Windows 系统这个值是 ftLastAccessTime
。 在某些系统中这个属性可能不存在。
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.
blksize
blksize: number | null
用于 I/O 操作的文件系统块的大小。
Blocksize for filesystem I/O.
只在 Linux/Mac OS 有效。
Linux/Mac OS only.
blocks
blocks: number | null
为此文件分配的块数,此值是一个 512 字节单位。
Number of blocks allocated to the file, in 512-byte units.
只在 Linux/Mac OS 有效。
Linux/Mac OS only.
created
created: number | null
文件的创建时间。 在 Linux/Mac 系统这个值是 birthtime
,在 Windows 系统这个值是 ftCreationTime
。 在某些系统中这个属性可能不存在。
The last access 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.
dev
dev: number | null
包含此文件的设备的 ID。
ID of the device containing the file.
只在 Linux/Mac OS 有效。
Linux/Mac OS only.
gid
gid: number | null
拥有该文件的用户组的 gid。
User ID of the owner of this file.
只在 Linux/Mac OS 有效。
Linux/Mac OS only.
ino
ino: number | null
Inode 值。
Inode number.
只在 Linux/Mac OS 有效。
Linux/Mac OS only.
isDirectory
isDirectory: boolean
判断文件是否为一个常规目录。该结果与 FileInfo.isFile
和 FileInfo.isSymlink
互斥。
True if this is info for a regular directory. Mutually exclusive to FileInfo.isFile
and FileInfo.isSymlink
.
isFile
isFile: boolean
判断文件是否为一个常规文件。该结果与 FileInfo.isDirectory
和 FileInfo.isSymlink
互斥。
True if this is info for a regular file. Mutually exclusive to FileInfo.isDirectory
and FileInfo.isSymlink
.
isSymlink
isSymlink: boolean
判断文件是否为一个符号链接。该结果与 FileInfo.isDirectory
和 FileInfo.isDirectory
互斥。
True if this is info for a symlink. Mutually exclusive to FileInfo.isFile
and FileInfo.isDirectory
.
mode
mode: number | null
不稳定: 将此属性的行为与 Windows 上的 Go 相匹配。
UNSTABLE*: Match behavior with Go on Windows for mode
.
该文件或目录的权限位,返回标准的 Unix 底层 st_mode
位。
The underlying raw st_mode
bits that contain the standard Unix permissions for this file/directory.
modified
modified: number | null
文件最后修改时间。 在 Linux/Mac 系统这个值是 mtime
,在 Windows 系统这个值是 ftLastWriteTime
。 在某些系统中这个属性可能不存在。
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
nlink: number | null
文件的硬链接数。
Number of hard links pointing to this file.
只在 Linux/Mac OS 有效。
Linux/Mac OS only.
rdev
rdev: number | null
文件设备标识符 ID。
Device ID of this file.
只在 Linux/Mac OS 有效。
Linux/Mac OS only.
size
size: number
文件的大小,单位 byte。
The size of the file, in bytes.
uid
uid: number | null
拥有该文件的用户的 uid。
User ID of the owner of this file.
只在 Linux/Mac OS 有效。
Linux/Mac OS only.
图例说明
- Property
本文档使用 TypeDoc 生成。