Skip to main content
Deno.FileInfo - Deno documentation
interface Deno.FileInfo
Provides information about a file and is returned by [`Deno.stat`](../././~/Deno.stat), [`Deno.lstat`](../././~/Deno.lstat), [`Deno.statSync`](../././~/Deno.statSync), and [`Deno.lstatSync`](../././~/Deno.lstatSync) or from calling `stat()` and `statSync()` on an [`Deno.FsFile`](../././~/Deno.FsFile) instance.

Properties

isFile: boolean
True if this is info for a regular file. Mutually exclusive to `FileInfo.isDirectory` and `FileInfo.isSymlink`.
isDirectory: boolean
True if this is info for a regular directory. Mutually exclusive to `FileInfo.isFile` and `FileInfo.isSymlink`.
size: number
The size of the file, in bytes.
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: 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: 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.
dev: number
ID of the device containing the file.
ino: number | null
Inode number. _Linux/Mac OS only._
mode: number | null
The underlying raw `st_mode` bits that contain the standard Unix permissions for this file/directory. _Linux/Mac OS only._
uid: number | null
User ID of the owner of this file. _Linux/Mac OS only._
gid: number | null
Group ID of the owner of this file. _Linux/Mac OS only._
rdev: number | null
Device ID of this file. _Linux/Mac OS only._
blksize: number | null
Blocksize for filesystem I/O. _Linux/Mac OS only._
blocks: number | null
Number of blocks allocated to the file, in 512-byte units. _Linux/Mac OS only._
isBlockDevice: boolean | null
True if this is info for a block device. _Linux/Mac OS only._
isCharDevice: boolean | null
True if this is info for a char device. _Linux/Mac OS only._
isFifo: boolean | null
True if this is info for a fifo. _Linux/Mac OS only._
isSocket: boolean | null
True if this is info for a socket. _Linux/Mac OS only._