deno.fileinfo

🌙
手机阅读
本文目录结构

FileInfo 用于描述 stat, lstat, statSync, lstatSync 函数返回的文件信息。而 readdir, readdirSync 返回的信息则用 FileInfo 列表来描述。

A FileInfo describes a file and is returned by stat, lstat, statSync, lstatSync.

继承关系

索引

Properties

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.isFileFileInfo.isSymlink 互斥。

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

isFile

isFile: boolean

判断文件是否为一个常规文件。该结果与 FileInfo.isDirectoryFileInfo.isSymlink 互斥。

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

isSymlink: boolean

判断文件是否为一个符号链接。该结果与 FileInfo.isDirectoryFileInfo.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: 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 生成。

AXIHE / 精选资源

浏览全部教程

面试题

学习网站

前端培训
自己甄别

前端书籍

关于朱安邦

我叫 朱安邦,阿西河的站长,在杭州。

以前是一名平面设计师,后来开始接接触前端开发,主要研究前端技术中的JS方向。

业余时间我喜欢分享和交流自己的技术,欢迎大家关注我的 Bilibili

关注我: Github / 知乎

于2021年离开前端领域,目前重心放在研究区块链上面了

我叫朱安邦,阿西河的站长

目前在杭州从事区块链周边的开发工作,机械专业,以前从事平面设计工作。

2014年底脱产在老家自学6个月的前端技术,自学期间几乎从未出过家门,最终找到了满意的前端工作。更多>

于2021年离开前端领域,目前从事区块链方面工作了