Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • FileInfo

Index

Properties

accessed

accessed: number | 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.

created

created: number | null

The last access time of the file. This corresponds to the birthtime field from stat on Unix and ftCreationTime on Windows. This may not be available on all platforms.

len

len: number

The size of the file, in bytes.

mode

mode: number | null

The underlying raw st_mode bits that contain the standard Unix permissions for this file/directory. TODO Match behavior with Go on windows for mode.

modified

modified: number | null

The last modification time of the file. This corresponds to the mtime field from stat on Unix and ftLastWriteTime on Windows. This may not be available on all platforms.

name

name: string | null

Returns the file or directory name.

path

path: string | null

Returns the file or directory path.

Methods

isDirectory

  • isDirectory(): boolean
  • Returns whether this is info for a regular directory. This result is mutually exclusive to FileInfo.isFile and FileInfo.isSymlink.

    Returns boolean

isFile

  • isFile(): boolean
  • Returns whether this is info for a regular file. This result is mutually exclusive to FileInfo.isDirectory and FileInfo.isSymlink.

    Returns boolean

isSymlink

  • isSymlink(): boolean
  • Returns whether this is info for a symlink. This result is mutually exclusive to FileInfo.isFile and FileInfo.isDirectory.

    Returns boolean

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc