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 {@link readdir } or {@link 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.
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 {@link readdir } or {@link 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.
(block-device? dirent)
Returns true
if the fs.Dirent
object describes a block device.
Returns: boolean
Returns `true` if the `fs.Dirent` object describes a block device. **Returns:** `boolean`
(character-device? dirent)
Returns true
if the fs.Dirent
object describes a character device.
Returns: boolean
Returns `true` if the `fs.Dirent` object describes a character device. **Returns:** `boolean`
(directory? dirent)
Returns true
if the fs.Dirent
object describes a file system
directory.
Returns: boolean
Returns `true` if the `fs.Dirent` object describes a file system directory. **Returns:** `boolean`
(fifo? dirent)
Returns true
if the fs.Dirent
object describes a first-in-first-out
(FIFO) pipe.
Returns: boolean
Returns `true` if the `fs.Dirent` object describes a first-in-first-out (FIFO) pipe. **Returns:** `boolean`
(file? dirent)
Returns true
if the fs.Dirent
object describes a regular file.
Returns: boolean
Returns `true` if the `fs.Dirent` object describes a regular file. **Returns:** `boolean`
(name dirent)
The file name that this fs.Dirent
object refers to. The type of this
value is determined by the options.encoding
passed to {@link readdir } or {@link readdirSync }.
The file name that this `fs.Dirent` object refers to. The type of this value is determined by the `options.encoding` passed to {@link readdir } or {@link readdirSync }.
(parent-path dirent)
The base path that this fs.Dirent
object refers to.
The base path that this `fs.Dirent` object refers to.
(path dirent)
Alias for dirent.parentPath
.
Alias for `dirent.parentPath`.
(set-name! dirent value)
The file name that this fs.Dirent
object refers to. The type of this
value is determined by the options.encoding
passed to {@link readdir } or {@link readdirSync }.
The file name that this `fs.Dirent` object refers to. The type of this value is determined by the `options.encoding` passed to {@link readdir } or {@link readdirSync }.
(set-parent-path! dirent value)
The base path that this fs.Dirent
object refers to.
The base path that this `fs.Dirent` object refers to.
(set-path! dirent value)
Alias for dirent.parentPath
.
Alias for `dirent.parentPath`.
(socket? dirent)
Returns true
if the fs.Dirent
object describes a socket.
Returns: boolean
Returns `true` if the `fs.Dirent` object describes a socket. **Returns:** `boolean`
(symbolic-link? dirent)
Returns true
if the fs.Dirent
object describes a symbolic link.
Returns: boolean
Returns `true` if the `fs.Dirent` object describes a symbolic link. **Returns:** `boolean`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close