FileInfo class

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

Available extensions
Annotations
  • @JS()
  • @staticInterop
  • @anonymous

Constructors

FileInfo({bool? isFile, bool? isDirectory, bool? isSymlink, num? size, DateTime? mtime, DateTime? atime, DateTime? birthtime, num? dev, num? ino, num? mode, num? nlink, num? uid, num? gid, num? rdev, num? blksize, num? blocks, bool? isBlockDevice, bool? isCharDevice, bool? isFifo, bool? isSocket})
factory

Properties

atime DateTime?

Available on FileInfo, provided by the FileInfo$Typings extension

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.
getter/setter pair
birthtime DateTime?

Available on FileInfo, provided by the FileInfo$Typings extension

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.
getter/setter pair
blksize num?

Available on FileInfo, provided by the FileInfo$Typings extension

Blocksize for filesystem I/O.
getter/setter pair
blocks num?

Available on FileInfo, provided by the FileInfo$Typings extension

Number of blocks allocated to the file, in 512-byte units.
getter/setter pair
dev num

Available on FileInfo, provided by the FileInfo$Typings extension

ID of the device containing the file.
getter/setter pair
gid num?

Available on FileInfo, provided by the FileInfo$Typings extension

Group ID of the owner of this file.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
ino num?

Available on FileInfo, provided by the FileInfo$Typings extension

Inode number.
getter/setter pair
isBlockDevice bool?

Available on FileInfo, provided by the FileInfo$Typings extension

True if this is info for a block device.
getter/setter pair
isCharDevice bool?

Available on FileInfo, provided by the FileInfo$Typings extension

True if this is info for a char device.
getter/setter pair
isDirectory bool

Available on FileInfo, provided by the FileInfo$Typings extension

True if this is info for a regular directory. Mutually exclusive to FileInfo.isFile and FileInfo.isSymlink.
getter/setter pair
isFifo bool?

Available on FileInfo, provided by the FileInfo$Typings extension

True if this is info for a fifo.
getter/setter pair
isFile bool

Available on FileInfo, provided by the FileInfo$Typings extension

True if this is info for a regular file. Mutually exclusive to FileInfo.isDirectory and FileInfo.isSymlink.
getter/setter pair
isSocket bool?

Available on FileInfo, provided by the FileInfo$Typings extension

True if this is info for a socket.
getter/setter pair

Available on FileInfo, provided by the FileInfo$Typings extension

True if this is info for a symlink. Mutually exclusive to FileInfo.isFile and FileInfo.isDirectory.
getter/setter pair
mode num?

Available on FileInfo, provided by the FileInfo$Typings extension

UNSTABLE*: Match behavior with Go on Windows for mode.
getter/setter pair
mtime DateTime?

Available on FileInfo, provided by the FileInfo$Typings extension

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.
getter/setter pair

Available on FileInfo, provided by the FileInfo$Typings extension

Number of hard links pointing to this file.
getter/setter pair
rdev num?

Available on FileInfo, provided by the FileInfo$Typings extension

Device ID of this file.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size num

Available on FileInfo, provided by the FileInfo$Typings extension

The size of the file, in bytes.
getter/setter pair
uid num?

Available on FileInfo, provided by the FileInfo$Typings extension

User ID of the owner of this file.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited