Dirent
[<Interface>]
type Dirent<'Name> =
abstract member name: 'Name with get, set
abstract member parentPath: string with get, set
abstract member path: string with get, set
static member Create (isFile: unit -> bool, isDirectory: unit -> bool, isBlockDevice: unit -> bool, isCharacterDevice: unit -> bool, isSymbolicLink: unit -> bool, isFIFO: unit -> bool, isSocket: unit -> bool, name: 'Name, parentPath: string, path: string) : Dirent<'Name>
abstract member isBlockDevice () : bool
abstract member isCharacterDevice () : bool
abstract member isDirectory () : bool
abstract member isFIFO () : bool
abstract member isFile () : bool
abstract member isSocket () : bool
abstract member isSymbolicLink () : bool| Assembly | Xantham.Fable.Node |
| Attributes | [<Interface>] |
A representation of a directory entry, which can be a file or a subdirectory within the directory, as returned by reading from an fs.Dir. The directory entry is a combination of the file name and file type pairs.
Additionally, when readdir or readdirSync is called with the withFileTypes option set to true, the resulting array is filled with fs.Dirent objects, rather than strings or Buffer s.
@since v10.10.0
Properties
abstract member name: 'Name with get, set
abstract member name: 'Name with get, setThe file name that this fs.Dirent object refers to. The type of this value is determined by the options.encoding passed to readdir or readdirSync.
@since v10.10.0
abstract member parentPath: string with get, set
abstract member parentPath: string with get, setThe path to the parent directory of the file this fs.Dirent object refers to.
@since v20.12.0, v18.20.0
Methods
abstract member isBlockDevice () : bool
abstract member isBlockDevice () : boolReturns true if the fs.Dirent object describes a block device.
@since v10.10.0
abstract member isCharacterDevice () : bool
abstract member isCharacterDevice () : boolReturns true if the fs.Dirent object describes a character device.
@since v10.10.0
abstract member isDirectory () : bool
abstract member isDirectory () : boolReturns true if the fs.Dirent object describes a file system directory.
@since v10.10.0
abstract member isFIFO () : bool
abstract member isFIFO () : boolReturns true if the fs.Dirent object describes a first-in-first-out (FIFO) pipe.
@since v10.10.0
abstract member isFile () : bool
abstract member isFile () : boolReturns true if the fs.Dirent object describes a regular file.
@since v10.10.0
abstract member isSocket () : bool
abstract member isSocket () : boolReturns true if the fs.Dirent object describes a socket.
@since v10.10.0
abstract member isSymbolicLink () : bool
abstract member isSymbolicLink () : boolReturns true if the fs.Dirent object describes a symbolic link.
@since v10.10.0