Skip to main content

fs

@listenai/lisa_core / Exports / fs

Namespace: fs

Table of contents#

Namespaces#

Classes#

Interfaces#

Type aliases#

Variables#

Functions#

Type aliases#

ArrayBufferView#

Ƭ ArrayBufferView: NodeJS.TypedArray | DataView

Defined in#

node_modules/@types/fs-extra/index.d.ts:310


BufferEncodingOption#

Ƭ BufferEncodingOption: "buffer" | { encoding: "buffer" }

Defined in#

node_modules/@types/node/fs.d.ts:19


CopyFilterAsync#

Ƭ CopyFilterAsync: (src: string, dest: string) => Promise<boolean>

Type declaration#

▸ (src, dest): Promise<boolean>

Parameters#
NameType
srcstring
deststring
Returns#

Promise<boolean>

Defined in#

node_modules/@types/fs-extra/index.d.ts:304


CopyFilterSync#

Ƭ CopyFilterSync: (src: string, dest: string) => boolean

Type declaration#

▸ (src, dest): boolean

Parameters#
NameType
srcstring
deststring
Returns#

boolean

Defined in#

node_modules/@types/fs-extra/index.d.ts:303


Mode#

Ƭ Mode: string | number

Defined in#

node_modules/@types/fs-extra/index.d.ts:308


NoParamCallback#

Ƭ NoParamCallback: (err: NodeJS.ErrnoException | null) => void

Type declaration#

▸ (err): void

Parameters#
NameType
errNodeJS.ErrnoException | null
Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:17


OpenMode#

Ƭ OpenMode: number | string

Defined in#

node_modules/@types/node/fs.d.ts:25


PathLike#

Ƭ PathLike: string | Buffer | URL

Valid types for path values in "fs".

Defined in#

node_modules/@types/node/fs.d.ts:15


SymlinkType#

Ƭ SymlinkType: "dir" | "file" | "junction"

Defined in#

node_modules/@types/fs-extra/index.d.ts:306

Variables#

project#

project: Project

项目主路径,默认为命令行运行的当前的目录

Defined in#

src/fs/index.ts:22

Functions#

access#

access(path, callback): void

Parameters#

NameType
pathPathLike
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:126

access(path, mode, callback): void

Parameters#

NameType
pathPathLike
modenumber
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:127

access(path, mode?): Promise<void>

Parameters#

NameType
pathPathLike
mode?number

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:128


accessSync#

accessSync(path, mode?): void

Synchronously tests a user's permissions for the file specified by path.

Parameters#

NameTypeDescription
pathPathLikeA path to a file or directory. If a URL is provided, it must use the file: protocol. URL support is experimental.
mode?number-

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:2056


appendFile#

appendFile(file, data, options, callback): void

Parameters#

NameType
filePathLike | number
dataany
optionsObject
options.encoding?string
options.flag?string
options.mode?number | string
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:130

appendFile(file, data, callback): void

Parameters#

NameType
filePathLike | number
dataany
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:132

appendFile(file, data, options?): Promise<void>

Parameters#

NameType
filePathLike | number
dataany
options?Object
options.encoding?string
options.flag?string
options.mode?number | string

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:133


appendFileSync#

appendFileSync(file, data, options?): void

Synchronously append data to a file, creating the file if it does not exist.

Parameters#

NameTypeDescription
filePathLike | numberA path to a file. If a URL is provided, it must use the file: protocol. URL support is experimental. If a file descriptor is provided, the underlying file will not be closed automatically.
datastring | Uint8ArrayThe data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
options?WriteFileOptionsEither the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. If encoding is not supplied, the default of 'utf8' is used. If mode is not supplied, the default of 0o666 is used. If mode is a string, it is parsed as an octal integer. If flag is not supplied, the default of 'a' is used.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:1767


chmod#

chmod(path, mode, callback): void

Parameters#

NameType
pathPathLike
modeMode
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:135

chmod(path, mode): Promise<void>

Parameters#

NameType
pathPathLike
modeMode

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:136


chmodSync#

chmodSync(path, mode): void

Synchronous chmod(2) - Change permissions of a file.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
modeModeA file mode. If a string is passed, it is parsed as an octal integer.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:489


chown#

chown(path, uid, gid): Promise<void>

Parameters#

NameType
pathPathLike
uidnumber
gidnumber

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:138

chown(path, uid, gid, callback): void

Parameters#

NameType
pathPathLike
uidnumber
gidnumber
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:139


chownSync#

chownSync(path, uid, gid): void

Synchronous chown(2) - Change ownership of a file.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
uidnumber-
gidnumber-

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:390


close#

close(fd, callback): void

Parameters#

NameType
fdnumber
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:141

close(fd): Promise<void>

Parameters#

NameType
fdnumber

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:142


closeSync#

closeSync(fd): void

Synchronous close(2) - close a file descriptor.

Parameters#

NameTypeDescription
fdnumberA file descriptor.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:1262


copy#

copy(src, dest, options?): Promise<void>

Parameters#

NameType
srcstring
deststring
options?CopyOptions

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:23

copy(src, dest, callback): void

Parameters#

NameType
srcstring
deststring
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:24

copy(src, dest, options, callback): void

Parameters#

NameType
srcstring
deststring
optionsCopyOptions
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:25


copyFile#

copyFile(src, dest, flags?): Promise<void>

Parameters#

NameType
srcstring
deststring
flags?number

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:28

copyFile(src, dest, callback): void

Parameters#

NameType
srcstring
deststring
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:29

copyFile(src, dest, flags, callback): void

Parameters#

NameType
srcstring
deststring
flagsnumber
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:30


copyFileSync#

copyFileSync(src, dest, flags?): void

Synchronously copies src to dest. By default, dest is overwritten if it already exists. Node.js makes no guarantees about the atomicity of the copy operation. If an error occurs after the destination file has been opened for writing, Node.js will attempt to remove the destination.

Parameters#

NameTypeDescription
srcPathLikeA path to the source file.
destPathLikeA path to the destination file.
flags?numberAn optional integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:2164


copySync#

copySync(src, dest, options?): void

Parameters#

NameType
srcstring
deststring
options?CopyOptionsSync

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:26


createFile#

createFile(file): Promise<void>

Parameters#

NameType
filestring

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:37

createFile(file, callback): void

Parameters#

NameType
filestring
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:38


createFileSync#

createFileSync(file): void

Parameters#

NameType
filestring

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:39


createLink#

Const createLink(src, dest): Promise<void>

Parameters#

NameType
srcstring
deststring

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:102

Const createLink(src, dest, callback): void

Parameters#

NameType
srcstring
deststring
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:102


createLinkSync#

Const createLinkSync(src, dest): void

Parameters#

NameType
srcstring
deststring

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:105


createReadStream#

createReadStream(path, options?): ReadStream

Returns a new ReadStream object.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol. URL support is experimental.
options?string | { autoClose?: boolean ; emitClose?: boolean ; encoding?: BufferEncoding ; end?: number ; fd?: number ; flags?: string ; highWaterMark?: number ; mode?: number ; start?: number }-

Returns#

ReadStream

Defined in#

node_modules/@types/node/fs.d.ts:2063


createSymlink#

createSymlink(src, dest, type): Promise<void>

Parameters#

NameType
srcstring
deststring
typeSymlinkType

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:41

createSymlink(src, dest, type, callback?): void

Parameters#

NameType
srcstring
deststring
typeSymlinkType
callback?(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:42


createSymlinkSync#

createSymlinkSync(src, dest, type): void

Parameters#

NameType
srcstring
deststring
typeSymlinkType

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:43


createWriteStream#

createWriteStream(path, options?): WriteStream

Returns a new WriteStream object.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol. URL support is experimental.
options?string | { autoClose?: boolean ; emitClose?: boolean ; encoding?: BufferEncoding ; fd?: number ; flags?: string ; highWaterMark?: number ; mode?: number ; start?: number }-

Returns#

WriteStream

Defined in#

node_modules/@types/node/fs.d.ts:2083


emptyDir#

emptyDir(path): Promise<void>

Parameters#

NameType
pathstring

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:112

emptyDir(path, callback): void

Parameters#

NameType
pathstring
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:113


emptyDirSync#

emptyDirSync(path): void

Parameters#

NameType
pathstring

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:116


emptydir#

Const emptydir(path): Promise<void>

Parameters#

NameType
pathstring

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:114

Const emptydir(path, callback): void

Parameters#

NameType
pathstring
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:114


emptydirSync#

Const emptydirSync(path): void

Parameters#

NameType
pathstring

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:117


ensureDir#

ensureDir(path, options?): Promise<void>

Parameters#

NameType
pathstring
options?EnsureOptions | number

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:45

ensureDir(path, callback?): void

Parameters#

NameType
pathstring
callback?(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:46

ensureDir(path, options?, callback?): void

Parameters#

NameType
pathstring
options?EnsureOptions | number
callback?(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:47


ensureDirSync#

ensureDirSync(path, options?): void

Parameters#

NameType
pathstring
options?EnsureOptions | number

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:48


ensureFile#

ensureFile(path): Promise<void>

Parameters#

NameType
pathstring

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:95

ensureFile(path, callback): void

Parameters#

NameType
pathstring
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:96


ensureFileSync#

ensureFileSync(path): void

Parameters#

NameType
pathstring

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:97


ensureLink#

ensureLink(src, dest): Promise<void>

Parameters#

NameType
srcstring
deststring

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:99

ensureLink(src, dest, callback): void

Parameters#

NameType
srcstring
deststring
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:100


ensureLinkSync#

ensureLinkSync(src, dest): void

Parameters#

NameType
srcstring
deststring

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:103


ensureSymlink#

ensureSymlink(src, dest, type?): Promise<void>

Parameters#

NameType
srcstring
deststring
type?SymlinkType

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:107

ensureSymlink(src, dest, type, callback): void

Parameters#

NameType
srcstring
deststring
typeSymlinkType
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:108

ensureSymlink(src, dest, callback): void

Parameters#

NameType
srcstring
deststring
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:109


ensureSymlinkSync#

ensureSymlinkSync(src, dest, type?): void

Parameters#

NameType
srcstring
deststring
type?SymlinkType

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:110


exists#

exists(path, callback): void

Asynchronously tests whether or not the given path exists by checking with the file system.

deprecated since v1.0.0 Use fs.stat() or fs.access() instead

Parameters#

NameTypeDescription
pathPathLikeA path to a file or directory. If a URL is provided, it must use the file: protocol. URL support is experimental.
callback(exists: boolean) => void-

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:1846


existsSync#

existsSync(path): boolean

Synchronously tests whether or not the given path exists by checking with the file system.

Parameters#

NameTypeDescription
pathPathLikeA path to a file or directory. If a URL is provided, it must use the file: protocol. URL support is experimental.

Returns#

boolean

Defined in#

node_modules/@types/node/fs.d.ts:1862


fchmod#

fchmod(fd, mode, callback): void

Parameters#

NameType
fdnumber
modeMode
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:144

fchmod(fd, mode): Promise<void>

Parameters#

NameType
fdnumber
modeMode

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:145


fchmodSync#

fchmodSync(fd, mode): void

Synchronous fchmod(2) - Change permissions of a file.

Parameters#

NameTypeDescription
fdnumberA file descriptor.
modeModeA file mode. If a string is passed, it is parsed as an octal integer.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:513


fchown#

fchown(fd, uid, gid, callback): void

Parameters#

NameType
fdnumber
uidnumber
gidnumber
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:147

fchown(fd, uid, gid): Promise<void>

Parameters#

NameType
fdnumber
uidnumber
gidnumber

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:148


fchownSync#

fchownSync(fd, uid, gid): void

Synchronous fchown(2) - Change ownership of a file.

Parameters#

NameTypeDescription
fdnumberA file descriptor.
uidnumber-
gidnumber-

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:411


fdatasync#

fdatasync(fd, callback): void

Parameters#

NameType
fdnumber
callback() => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:150

fdatasync(fd): Promise<void>

Parameters#

NameType
fdnumber

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:151


fdatasyncSync#

fdatasyncSync(fd): void

Synchronous fdatasync(2) - synchronize a file's in-core state with storage device.

Parameters#

NameTypeDescription
fdnumberA file descriptor.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:2113


fstat#

fstat(fd, callback): void

Parameters#

NameType
fdnumber
callback(err: NodeJS.ErrnoException, stats: Stats) => any

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:153

fstat(fd): Promise<Stats>

Parameters#

NameType
fdnumber

Returns#

Promise<Stats>

Defined in#

node_modules/@types/fs-extra/index.d.ts:154


fstatSync#

fstatSync(fd, options?): Stats

Synchronous fstat(2) - Get file status.

Parameters#

NameTypeDescription
fdnumberA file descriptor.
options?StatOptions & { bigint?: false }-

Returns#

Stats

Defined in#

node_modules/@types/node/fs.d.ts:591

fstatSync(fd, options): BigIntStats

Parameters#

NameType
fdnumber
optionsStatOptions & { bigint: true }

Returns#

BigIntStats

Defined in#

node_modules/@types/node/fs.d.ts:592

fstatSync(fd, options?): Stats | BigIntStats

Parameters#

NameType
fdnumber
options?StatOptions

Returns#

Stats | BigIntStats

Defined in#

node_modules/@types/node/fs.d.ts:593


fsync#

fsync(fd, callback): void

Parameters#

NameType
fdnumber
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:156

fsync(fd): Promise<void>

Parameters#

NameType
fdnumber

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:157


fsyncSync#

fsyncSync(fd): void

Synchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.

Parameters#

NameTypeDescription
fdnumberA file descriptor.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:1367


ftruncate#

ftruncate(fd, callback): void

Parameters#

NameType
fdnumber
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:159

ftruncate(fd, len, callback): void

Parameters#

NameType
fdnumber
lennumber
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:160

ftruncate(fd, len?): Promise<void>

Parameters#

NameType
fdnumber
len?number

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:161


ftruncateSync#

ftruncateSync(fd, len?): void

Synchronous ftruncate(2) - Truncate a file to a specified length.

Parameters#

NameTypeDescription
fdnumberA file descriptor.
len?number | nullIf not specified, defaults to 0.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:369


futimes#

futimes(fd, atime, mtime, callback): void

Parameters#

NameType
fdnumber
atimenumber
mtimenumber
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:163

futimes(fd, atime, mtime, callback): void

Parameters#

NameType
fdnumber
atimeDate
mtimeDate
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:164

futimes(fd, atime, mtime): Promise<void>

Parameters#

NameType
fdnumber
atimenumber
mtimenumber

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:165

futimes(fd, atime, mtime): Promise<void>

Parameters#

NameType
fdnumber
atimeDate
mtimeDate

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:166


futimesSync#

futimesSync(fd, atime, mtime): void

Synchronously change file timestamps of the file referenced by the supplied file descriptor.

Parameters#

NameTypeDescription
fdnumberA file descriptor.
atimestring | number | DateThe last access time. If a string is provided, it will be coerced to number.
mtimestring | number | DateThe last modified time. If a string is provided, it will be coerced to number.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:1346


lchmod#

lchmod(path, mode, callback): void

Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
modeModeA file mode. If a string is passed, it is parsed as an octal integer.
callbackNoParamCallback-

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:520


lchmodSync#

lchmodSync(path, mode): void

Synchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
modeModeA file mode. If a string is passed, it is parsed as an octal integer.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:537


lchown#

lchown(path, uid, gid, callback): void

Parameters#

NameType
pathPathLike
uidnumber
gidnumber
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:168

lchown(path, uid, gid): Promise<void>

Parameters#

NameType
pathPathLike
uidnumber
gidnumber

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:169


lchownSync#

lchownSync(path, uid, gid): void

Synchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
uidnumber-
gidnumber-

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:432


link#

link(existingPath, newPath, callback): void

Parameters#

NameType
existingPathPathLike
newPathPathLike
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:171

link(existingPath, newPath): Promise<void>

Parameters#

NameType
existingPathPathLike
newPathPathLike

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:172


linkSync#

linkSync(existingPath, newPath): void

Synchronous link(2) - Create a new link (also known as a hard link) to an existing file.

Parameters#

NameTypeDescription
existingPathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
newPathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:645


lstat#

lstat(path, callback): void

Parameters#

NameType
pathPathLike
callback(err: NodeJS.ErrnoException, stats: Stats) => any

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:174

lstat(path): Promise<Stats>

Parameters#

NameType
pathPathLike

Returns#

Promise<Stats>

Defined in#

node_modules/@types/fs-extra/index.d.ts:175


lstatSync#

lstatSync(path, options?): Stats

Synchronous lstat(2) - Get file status. Does not dereference symbolic links.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
options?StatOptions & { bigint?: false }-

Returns#

Stats

Defined in#

node_modules/@types/node/fs.d.ts:619

lstatSync(path, options): BigIntStats

Parameters#

NameType
pathPathLike
optionsStatOptions & { bigint: true }

Returns#

BigIntStats

Defined in#

node_modules/@types/node/fs.d.ts:620

lstatSync(path, options?): Stats | BigIntStats

Parameters#

NameType
pathPathLike
options?StatOptions

Returns#

Stats | BigIntStats

Defined in#

node_modules/@types/node/fs.d.ts:621


lutimes#

lutimes(path, atime, mtime, callback): void

Changes the access and modification times of a file in the same way as fs.utimes(), with the difference that if the path refers to a symbolic link, then the link is not dereferenced: instead, the timestamps of the symbolic link itself are changed.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
atimestring | number | DateThe last access time. If a string is provided, it will be coerced to number.
mtimestring | number | DateThe last modified time. If a string is provided, it will be coerced to number.
callbackNoParamCallback-

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:442


lutimesSync#

lutimesSync(path, atime, mtime): void

Change the file system timestamps of the symbolic link referenced by path. Returns undefined, or throws an exception when parameters are incorrect or the operation fails. This is the synchronous version of fs.lutimes().

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
atimestring | number | DateThe last access time. If a string is provided, it will be coerced to number.
mtimestring | number | DateThe last modified time. If a string is provided, it will be coerced to number.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:465


mkdir#

mkdir(path, callback): void

Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.

Parameters#

NameTypeDescription
pathPathLike-
callback(err: NodeJS.ErrnoException) => voidNo arguments other than a possible exception are given to the completion callback.

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:182

mkdir(path, options, callback): void

Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777.

Parameters#

NameTypeDescription
pathPathLike-
optionsMode | MakeDirectoryOptions | null-
callback(err: NodeJS.ErrnoException) => voidNo arguments other than a possible exception are given to the completion callback.

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:188

mkdir(path, options?): Promise<void>

Parameters#

NameType
pathPathLike
options?Mode | MakeDirectoryOptions | null

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:189


mkdirSync#

mkdirSync(path, options?): void

Parameters#

NameType
pathPathLike
options?Mode | MakeDirectoryOptions | null

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:190


mkdirp#

mkdirp(dir): Promise<void>

Parameters#

NameType
dirstring

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:52

mkdirp(dir, callback): void

Parameters#

NameType
dirstring
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:53


mkdirpSync#

mkdirpSync(dir): void

Parameters#

NameType
dirstring

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:55


mkdirs#

mkdirs(dir): Promise<void>

Parameters#

NameType
dirstring

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:50

mkdirs(dir, callback): void

Parameters#

NameType
dirstring
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:51


mkdirsSync#

mkdirsSync(dir): void

Parameters#

NameType
dirstring

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:54


mkdtemp#

mkdtemp(prefix): Promise<string>

Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.

Parameters#

NameType
prefixstring

Returns#

Promise<string>

Defined in#

node_modules/@types/fs-extra/index.d.ts:291

mkdtemp(prefix, callback): void

Parameters#

NameType
prefixstring
callback(err: NodeJS.ErrnoException, folder: string) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:292


mkdtempSync#

mkdtempSync(prefix, options?): string

Synchronously creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.

Parameters#

NameTypeDescription
prefixstring-
options?BaseEncodingOptions | BufferEncoding | nullThe encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8' is used.

Returns#

string

Defined in#

node_modules/@types/node/fs.d.ts:1126

mkdtempSync(prefix, options): Buffer

Synchronously creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.

Parameters#

NameTypeDescription
prefixstring-
optionsBufferEncodingOptionThe encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8' is used.

Returns#

Buffer

Defined in#

node_modules/@types/node/fs.d.ts:1133

mkdtempSync(prefix, options?): string | Buffer

Synchronously creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.

Parameters#

NameTypeDescription
prefixstring-
options?BaseEncodingOptions | string | nullThe encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8' is used.

Returns#

string | Buffer

Defined in#

node_modules/@types/node/fs.d.ts:1140


move#

move(src, dest, options?): Promise<void>

Parameters#

NameType
srcstring
deststring
options?MoveOptions

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:32

move(src, dest, callback): void

Parameters#

NameType
srcstring
deststring
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:33

move(src, dest, options, callback): void

Parameters#

NameType
srcstring
deststring
optionsMoveOptions
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:34


moveSync#

moveSync(src, dest, options?): void

Parameters#

NameType
srcstring
deststring
options?MoveOptions

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:35


open#

open(path, flags, callback): void

Parameters#

NameType
pathPathLike
flagsstring | number
callback(err: NodeJS.ErrnoException, fd: number) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:192

open(path, flags, mode, callback): void

Parameters#

NameType
pathPathLike
flagsstring | number
modeMode
callback(err: NodeJS.ErrnoException, fd: number) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:193

open(path, flags, mode?): Promise<number>

Parameters#

NameType
pathPathLike
flagsstring | number
mode?Mode | null

Returns#

Promise<number>

Defined in#

node_modules/@types/fs-extra/index.d.ts:194


openSync#

openSync(path, flags, mode?): number

Synchronous open(2) - open and possibly create a file, returning a file descriptor..

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
flagsOpenMode-
mode?Mode | nullA file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to 0o666.

Returns#

number

Defined in#

node_modules/@types/node/fs.d.ts:1292


opendir#

opendir(path, cb): void

Parameters#

NameType
pathstring
cb(err: NodeJS.ErrnoException | null, dir: Dir) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:196

opendir(path, options, cb): void

Parameters#

NameType
pathstring
optionsOpenDirOptions
cb(err: NodeJS.ErrnoException | null, dir: Dir) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:197

opendir(path, options?): Promise<Dir>

Parameters#

NameType
pathstring
options?OpenDirOptions

Returns#

Promise<Dir>

Defined in#

node_modules/@types/fs-extra/index.d.ts:202


opendirSync#

opendirSync(path, options?): Dir

Parameters#

NameType
pathstring
options?OpenDirOptions

Returns#

Dir

Defined in#

node_modules/@types/node/fs.d.ts:2236


outputFile#

outputFile(file, data, options?): Promise<void>

Parameters#

NameType
filestring
dataany
options?WriteFileOptions | string

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:57

outputFile(file, data, callback): void

Parameters#

NameType
filestring
dataany
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:58

outputFile(file, data, options, callback): void

Parameters#

NameType
filestring
dataany
optionsWriteFileOptions | string
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:59


outputFileSync#

outputFileSync(file, data, options?): void

Parameters#

NameType
filestring
dataany
options?WriteFileOptions | string

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:60


outputJSON#

outputJSON(file, data, options?): Promise<void>

Parameters#

NameType
filestring
dataany
options?WriteOptions

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:76

outputJSON(file, data, options, callback): void

Parameters#

NameType
filestring
dataany
optionsWriteOptions
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:77

outputJSON(file, data, callback): void

Parameters#

NameType
filestring
dataany
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:78


outputJSONSync#

outputJSONSync(file, data, options?): void

Parameters#

NameType
filestring
dataany
options?WriteOptions

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:83


outputJson#

outputJson(file, data, options?): Promise<void>

Parameters#

NameType
filestring
dataany
options?WriteOptions

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:79

outputJson(file, data, options, callback): void

Parameters#

NameType
filestring
dataany
optionsWriteOptions
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:80

outputJson(file, data, callback): void

Parameters#

NameType
filestring
dataany
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:81


outputJsonSync#

outputJsonSync(file, data, options?): void

Parameters#

NameType
filestring
dataany
options?WriteOptions

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:82


pathExists#

pathExists(path): Promise<boolean>

Parameters#

NameType
pathstring

Returns#

Promise<boolean>

Defined in#

node_modules/@types/fs-extra/index.d.ts:119

pathExists(path, callback): void

Parameters#

NameType
pathstring
callback(err: Error, exists: boolean) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:120


pathExistsSync#

pathExistsSync(path): boolean

Parameters#

NameType
pathstring

Returns#

boolean

Defined in#

node_modules/@types/fs-extra/index.d.ts:121


read#

read<TBuffer>(fd, buffer, offset, length, position, callback): void

Type parameters#

NameType
TBufferextends ArrayBufferView

Parameters#

NameType
fdnumber
bufferTBuffer
offsetnumber
lengthnumber
positionnumber | null
callback(err: NodeJS.ErrnoException, bytesRead: number, buffer: TBuffer) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:204

read<TBuffer>(fd, buffer, offset, length, position): Promise<Object>

Type parameters#

NameType
TBufferextends ArrayBufferView

Parameters#

NameType
fdnumber
bufferTBuffer
offsetnumber
lengthnumber
positionnumber | null

Returns#

Promise<Object>

Defined in#

node_modules/@types/fs-extra/index.d.ts:206


readFile#

readFile(file, callback): void

Parameters#

NameType
filePathLike | number
callback(err: NodeJS.ErrnoException, data: Buffer) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:208

readFile(file, encoding, callback): void

Parameters#

NameType
filePathLike | number
encodingstring
callback(err: NodeJS.ErrnoException, data: string) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:209

readFile(file, options, callback): void

Parameters#

NameType
filePathLike | number
options{ flag?: string } | { encoding: string ; flag?: string }
callback(err: NodeJS.ErrnoException, data: Buffer) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:210

readFile(file, options): Promise<string>

Parameters#

NameType
filePathLike | number
options{ flag?: string } | { encoding: string ; flag?: string }

Returns#

Promise<string>

Defined in#

node_modules/@types/fs-extra/index.d.ts:211

readFile(file, encoding): Promise<string>

Parameters#

NameType
filePathLike | number
encodingstring

Returns#

Promise<string>

Defined in#

node_modules/@types/fs-extra/index.d.ts:213

readFile(file): Promise<Buffer>

Parameters#

NameType
filePathLike | number

Returns#

Promise<Buffer>

Defined in#

node_modules/@types/fs-extra/index.d.ts:214


readFileSync#

readFileSync(path, options?): Buffer

Synchronously reads the entire contents of a file.

Parameters#

NameTypeDescription
pathPathLike | numberA path to a file. If a URL is provided, it must use the file: protocol. URL support is experimental. If a file descriptor is provided, the underlying file will not be closed automatically.
options?{ encoding?: null ; flag?: string } | nullAn object that may contain an optional flag. If a flag is not provided, it defaults to 'r'.

Returns#

Buffer

Defined in#

node_modules/@types/node/fs.d.ts:1637

readFileSync(path, options): string

Synchronously reads the entire contents of a file.

Parameters#

NameTypeDescription
pathPathLike | numberA path to a file. If a URL is provided, it must use the file: protocol. URL support is experimental. If a file descriptor is provided, the underlying file will not be closed automatically.
options{ encoding: BufferEncoding ; flag?: string } | BufferEncodingEither the encoding for the result, or an object that contains the encoding and an optional flag. If a flag is not provided, it defaults to 'r'.

Returns#

string

Defined in#

node_modules/@types/node/fs.d.ts:1647

readFileSync(path, options?): string | Buffer

Synchronously reads the entire contents of a file.

Parameters#

NameTypeDescription
pathPathLike | numberA path to a file. If a URL is provided, it must use the file: protocol. URL support is experimental. If a file descriptor is provided, the underlying file will not be closed automatically.
options?BaseEncodingOptions & { flag?: string } | BufferEncoding | nullEither the encoding for the result, or an object that contains the encoding and an optional flag. If a flag is not provided, it defaults to 'r'.

Returns#

string | Buffer

Defined in#

node_modules/@types/node/fs.d.ts:1657


readJSON#

readJSON(file, options?): Promise<any>

Parameters#

NameType
filestring
options?ReadOptions

Returns#

Promise<any>

Defined in#

node_modules/@types/fs-extra/index.d.ts:65

readJSON(file, callback): void

Parameters#

NameType
filestring
callback(err: Error, jsonObject: any) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:66

readJSON(file, options, callback): void

Parameters#

NameType
filestring
optionsReadOptions
callback(err: Error, jsonObject: any) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:67


readJSONSync#

readJSONSync(file, options?): any

Parameters#

NameType
filestring
options?ReadOptions

Returns#

any

Defined in#

node_modules/@types/fs-extra/index.d.ts:70


readJson#

readJson(file, options?): Promise<any>

Parameters#

NameType
filestring
options?ReadOptions

Returns#

Promise<any>

Defined in#

node_modules/@types/fs-extra/index.d.ts:62

readJson(file, callback): void

Parameters#

NameType
filestring
callback(err: Error, jsonObject: any) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:63

readJson(file, options, callback): void

Parameters#

NameType
filestring
optionsReadOptions
callback(err: Error, jsonObject: any) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:64


readJsonSync#

readJsonSync(file, options?): any

Parameters#

NameType
filestring
options?ReadOptions

Returns#

any

Defined in#

node_modules/@types/fs-extra/index.d.ts:69


readSync#

readSync(fd, buffer, offset, length, position): number

Synchronously reads data from the file referenced by the supplied file descriptor, returning the number of bytes read.

Parameters#

NameTypeDescription
fdnumberA file descriptor.
bufferNodeJS.ArrayBufferViewThe buffer that the data will be written to.
offsetnumberThe offset in the buffer at which to start writing.
lengthnumberThe number of bytes to read.
positionnumber | nullThe offset from the beginning of the file from which data should be read. If null, data will be read from the current position.

Returns#

number

Defined in#

node_modules/@types/node/fs.d.ts:1550

readSync(fd, buffer, opts?): number

Similar to the above fs.readSync function, this version takes an optional options object. If no options object is specified, it will default with the above values.

Parameters#

NameType
fdnumber
bufferNodeJS.ArrayBufferView
opts?ReadSyncOptions

Returns#

number

Defined in#

node_modules/@types/node/fs.d.ts:1556


readdir#

readdir(path, callback): void

Parameters#

NameType
pathPathLike
callback(err: NodeJS.ErrnoException, files: string[]) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:216

readdir(path, options?): Promise<string[]>

Parameters#

NameType
pathPathLike
options?{ encoding: BufferEncoding | null ; withFileTypes?: false } | BufferEncoding | null

Returns#

Promise<string[]>

Defined in#

node_modules/@types/fs-extra/index.d.ts:217

readdir(path, options): Promise<Buffer[]>

Parameters#

NameType
pathPathLike
options"buffer" | { encoding: "buffer" ; withFileTypes?: false }

Returns#

Promise<Buffer[]>

Defined in#

node_modules/@types/fs-extra/index.d.ts:218

readdir(path, options?): Promise<string[] | Buffer[]>

Parameters#

NameType
pathPathLike
options?Object
options.encoding?string | null
options.withFileTypes?false

Returns#

Promise<string[] | Buffer[]>

Defined in#

node_modules/@types/fs-extra/index.d.ts:219

readdir(path, options): Promise<Dirent[]>

Parameters#

NameType
pathPathLike
optionsObject
options.encoding?string | null
options.withFileTypestrue

Returns#

Promise<Dirent[]>

Defined in#

node_modules/@types/fs-extra/index.d.ts:220


readdirSync#

readdirSync(path, options?): string[]

Synchronous readdir(3) - read a directory.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
options?{ encoding: BufferEncoding | null ; withFileTypes?: false } | BufferEncoding | nullThe encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8' is used.

Returns#

string[]

Defined in#

node_modules/@types/node/fs.d.ts:1220

readdirSync(path, options): Buffer[]

Synchronous readdir(3) - read a directory.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
options{ encoding: "buffer" ; withFileTypes?: false } | "buffer"The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8' is used.

Returns#

Buffer[]

Defined in#

node_modules/@types/node/fs.d.ts:1227

readdirSync(path, options?): string[] | Buffer[]

Synchronous readdir(3) - read a directory.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
options?BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | nullThe encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8' is used.

Returns#

string[] | Buffer[]

Defined in#

node_modules/@types/node/fs.d.ts:1234

readdirSync(path, options): Dirent[]

Synchronous readdir(3) - read a directory.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
optionsBaseEncodingOptions & { withFileTypes: true }If called with withFileTypes: true the result data will be an array of Dirent.

Returns#

Dirent[]

Defined in#

node_modules/@types/node/fs.d.ts:1241


readlink#

readlink(path, callback): void

Parameters#

NameType
pathPathLike
callback(err: NodeJS.ErrnoException, linkString: string) => any

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:222

readlink(path): Promise<string>

Parameters#

NameType
pathPathLike

Returns#

Promise<string>

Defined in#

node_modules/@types/fs-extra/index.d.ts:223


readlinkSync#

readlinkSync(path, options?): string

Synchronous readlink(2) - read value of a symbolic link.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
options?BaseEncodingOptions | BufferEncoding | nullThe encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8' is used.

Returns#

string

Defined in#

node_modules/@types/node/fs.d.ts:746

readlinkSync(path, options): Buffer

Synchronous readlink(2) - read value of a symbolic link.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
optionsBufferEncodingOptionThe encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8' is used.

Returns#

Buffer

Defined in#

node_modules/@types/node/fs.d.ts:753

readlinkSync(path, options?): string | Buffer

Synchronous readlink(2) - read value of a symbolic link.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
options?BaseEncodingOptions | string | nullThe encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8' is used.

Returns#

string | Buffer

Defined in#

node_modules/@types/node/fs.d.ts:760


readv#

readv(fd, buffers, cb): void

Parameters#

NameType
fdnumber
buffersReadonlyArray<NodeJS.ArrayBufferView>
cb(err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:2199

readv(fd, buffers, position, cb): void

Parameters#

NameType
fdnumber
buffersReadonlyArray<NodeJS.ArrayBufferView>
positionnumber
cb(err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:2204


readvSync#

readvSync(fd, buffers, position?): number

See readv.

Parameters#

NameType
fdnumber
buffersReadonlyArray<NodeJS.ArrayBufferView>
position?number

Returns#

number

Defined in#

node_modules/@types/node/fs.d.ts:2223


realpath#

realpath(path, callback): void

Parameters#

NameType
pathPathLike
callback(err: NodeJS.ErrnoException, resolvedPath: string) => any

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:225

realpath(path, cache, callback): void

Parameters#

NameType
pathPathLike
cacheObject
callback(err: NodeJS.ErrnoException, resolvedPath: string) => any

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:226

realpath(path, cache?): Promise<string>

Parameters#

NameType
pathPathLike
cache?Object

Returns#

Promise<string>

Defined in#

node_modules/@types/fs-extra/index.d.ts:227


realpathSync#

realpathSync(path, options?): string

Synchronous realpath(3) - return the canonicalized absolute pathname.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
options?BaseEncodingOptions | BufferEncoding | nullThe encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8' is used.

Returns#

string

Defined in#

node_modules/@types/node/fs.d.ts:831

realpathSync(path, options): Buffer

Synchronous realpath(3) - return the canonicalized absolute pathname.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
optionsBufferEncodingOptionThe encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8' is used.

Returns#

Buffer

Defined in#

node_modules/@types/node/fs.d.ts:838

realpathSync(path, options?): string | Buffer

Synchronous realpath(3) - return the canonicalized absolute pathname.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
options?BaseEncodingOptions | string | nullThe encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, 'utf8' is used.

Returns#

string | Buffer

Defined in#

node_modules/@types/node/fs.d.ts:845


reloadProject#

reloadProject(): void

危险,本方法仅允许测试代码中使用

Returns#

void

Defined in#

src/fs/index.ts:27


remove#

remove(dir, callback): void

Parameters#

NameType
dirstring
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:72

remove(dir, callback?): Promise<void>

Parameters#

NameType
dirstring
callback?(err: Error) => void

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:73


removeSync#

removeSync(dir): void

Parameters#

NameType
dirstring

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:74


rename#

rename(oldPath, newPath, callback): void

Parameters#

NameType
oldPathPathLike
newPathPathLike
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:229

rename(oldPath, newPath): Promise<void>

Parameters#

NameType
oldPathPathLike
newPathPathLike

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:230


renameSync#

renameSync(oldPath, newPath): void

Synchronous rename(2) - Change the name or location of a file or directory.

Parameters#

NameTypeDescription
oldPathPathLikeA path to a file. If a URL is provided, it must use the file: protocol. URL support is experimental.
newPathPathLikeA path to a file. If a URL is provided, it must use the file: protocol. URL support is experimental.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:308


rm#

rm(path, callback): void

Asynchronously removes files and directories (modeled on the standard POSIX rm utility).

Parameters#

NameType
pathPathLike
callbackNoParamCallback

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:959

rm(path, options, callback): void

Parameters#

NameType
pathPathLike
optionsRmOptions
callbackNoParamCallback

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:960


rmSync#

rmSync(path, options?): void

Synchronously removes files and directories (modeled on the standard POSIX rm utility).

Parameters#

NameType
pathPathLike
options?RmOptions

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:973


rmdir#

rmdir(path, callback): void

Asynchronous rmdir - removes the directory specified in {path}

Parameters#

NameTypeDescription
pathPathLike-
callback(err: NodeJS.ErrnoException) => voidNo arguments other than a possible exception are given to the completion callback.

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:237

rmdir(path): Promise<void>

Parameters#

NameType
pathPathLike

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:238


rmdirSync#

rmdirSync(path, options?): void

Synchronous rmdir(2) - delete a directory.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
options?RmDirOptions-

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:924


stat#

stat(path, callback): void

Parameters#

NameType
pathPathLike
callback(err: NodeJS.ErrnoException, stats: Stats) => any

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:240

stat(path): Promise<Stats>

Parameters#

NameType
pathPathLike

Returns#

Promise<Stats>

Defined in#

node_modules/@types/fs-extra/index.d.ts:241


statSync#

statSync(path, options?): Stats

Synchronous stat(2) - Get file status.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
options?StatOptions & { bigint?: false }-

Returns#

Stats

Defined in#

node_modules/@types/node/fs.d.ts:563

statSync(path, options): BigIntStats

Parameters#

NameType
pathPathLike
optionsStatOptions & { bigint: true }

Returns#

BigIntStats

Defined in#

node_modules/@types/node/fs.d.ts:564

statSync(path, options?): Stats | BigIntStats

Parameters#

NameType
pathPathLike
options?StatOptions

Returns#

Stats | BigIntStats

Defined in#

node_modules/@types/node/fs.d.ts:565


symlink#

symlink(target, path, type, callback): void

Parameters#

NameType
targetPathLike
pathPathLike
typeSymlinkType | undefined
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:243

symlink(target, path, callback): void

Parameters#

NameType
targetPathLike
pathPathLike
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:244

symlink(target, path, type?): Promise<void>

Parameters#

NameType
targetPathLike
pathPathLike
type?SymlinkType

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:245


symlinkSync#

symlinkSync(target, path, type?): void

Synchronous symlink(2) - Create a new symbolic link to an existing file.

Parameters#

NameTypeDescription
targetPathLikeA path to an existing file. If a URL is provided, it must use the file: protocol.
pathPathLikeA path to the new symlink. If a URL is provided, it must use the file: protocol.
type?symlink.Type | nullMay be set to 'dir', 'file', or 'junction' (default is 'file') and is only available on Windows (ignored on other platforms). When using 'junction', the target argument will automatically be normalized to an absolute path.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:684


truncate#

truncate(path, callback): void

Parameters#

NameType
pathPathLike
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:247

truncate(path, len, callback): void

Parameters#

NameType
pathPathLike
lennumber
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:248

truncate(path, len?): Promise<void>

Parameters#

NameType
pathPathLike
len?number

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:249


truncateSync#

truncateSync(path, len?): void

Synchronous truncate(2) - Truncate a file to a specified length.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
len?number | nullIf not specified, defaults to 0.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:339


unlink#

unlink(path, callback): void

Asynchronous unlink - deletes the file specified in {path}

Parameters#

NameTypeDescription
pathPathLike-
callback(err: NodeJS.ErrnoException) => voidNo arguments other than a possible exception are given to the completion callback.

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:256

unlink(path): Promise<void>

Parameters#

NameType
pathPathLike

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:257


unlinkSync#

unlinkSync(path): void

Synchronous unlink(2) - delete a name and possibly the file it refers to.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:872


unwatchFile#

unwatchFile(filename, listener?): void

Stop watching for changes on filename.

Parameters#

NameTypeDescription
filenamePathLikeA path to a file or directory. If a URL is provided, it must use the file: protocol. URL support is experimental.
listener?(curr: Stats, prev: Stats) => void-

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:1786


utimes#

utimes(path, atime, mtime, callback): void

Parameters#

NameType
pathPathLike
atimenumber
mtimenumber
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:259

utimes(path, atime, mtime, callback): void

Parameters#

NameType
pathPathLike
atimeDate
mtimeDate
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:260

utimes(path, atime, mtime): Promise<void>

Parameters#

NameType
pathPathLike
atimenumber
mtimenumber

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:261

utimes(path, atime, mtime): Promise<void>

Parameters#

NameType
pathPathLike
atimeDate
mtimeDate

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:262


utimesSync#

utimesSync(path, atime, mtime): void

Synchronously change file timestamps of the file referenced by the supplied path.

Parameters#

NameTypeDescription
pathPathLikeA path to a file. If a URL is provided, it must use the file: protocol.
atimestring | number | DateThe last access time. If a string is provided, it will be coerced to number.
mtimestring | number | DateThe last modified time. If a string is provided, it will be coerced to number.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:1319


watch#

watch(filename, options, listener?): FSWatcher

Watch for changes on filename, where filename is either a file or a directory, returning an FSWatcher.

Parameters#

NameTypeDescription
filenamePathLikeA path to a file or directory. If a URL is provided, it must use the file: protocol. URL support is experimental.
options{ encoding?: BufferEncoding | null ; persistent?: boolean ; recursive?: boolean } | BufferEncoding | undefined | nullEither the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. If encoding is not supplied, the default of 'utf8' is used. If persistent is not supplied, the default of true is used. If recursive is not supplied, the default of false is used.
listener?(event: "rename" | "change", filename: string) => void-

Returns#

FSWatcher

Defined in#

node_modules/@types/node/fs.d.ts:1797

watch(filename, options, listener?): FSWatcher

Watch for changes on filename, where filename is either a file or a directory, returning an FSWatcher.

Parameters#

NameTypeDescription
filenamePathLikeA path to a file or directory. If a URL is provided, it must use the file: protocol. URL support is experimental.
options{ encoding: "buffer" ; persistent?: boolean ; recursive?: boolean } | "buffer"Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. If encoding is not supplied, the default of 'utf8' is used. If persistent is not supplied, the default of true is used. If recursive is not supplied, the default of false is used.
listener?(event: "rename" | "change", filename: Buffer) => void-

Returns#

FSWatcher

Defined in#

node_modules/@types/node/fs.d.ts:1812

watch(filename, options, listener?): FSWatcher

Watch for changes on filename, where filename is either a file or a directory, returning an FSWatcher.

Parameters#

NameTypeDescription
filenamePathLikeA path to a file or directory. If a URL is provided, it must use the file: protocol. URL support is experimental.
options{ encoding?: BufferEncoding | null ; persistent?: boolean ; recursive?: boolean } | string | nullEither the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. If encoding is not supplied, the default of 'utf8' is used. If persistent is not supplied, the default of true is used. If recursive is not supplied, the default of false is used.
listener?(event: "rename" | "change", filename: string | Buffer) => void-

Returns#

FSWatcher

Defined in#

node_modules/@types/node/fs.d.ts:1827

watch(filename, listener?): FSWatcher

Watch for changes on filename, where filename is either a file or a directory, returning an FSWatcher.

Parameters#

NameTypeDescription
filenamePathLikeA path to a file or directory. If a URL is provided, it must use the file: protocol. URL support is experimental.
listener?(event: "rename" | "change", filename: string) => any-

Returns#

FSWatcher

Defined in#

node_modules/@types/node/fs.d.ts:1838


watchFile#

watchFile(filename, options, listener): void

Watch for changes on filename. The callback listener will be called each time the file is accessed.

Parameters#

NameType
filenamePathLike
options{ interval?: number ; persistent?: boolean } | undefined
listener(curr: Stats, prev: Stats) => void

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:1772

watchFile(filename, listener): void

Watch for changes on filename. The callback listener will be called each time the file is accessed.

Parameters#

NameTypeDescription
filenamePathLikeA path to a file or directory. If a URL is provided, it must use the file: protocol. URL support is experimental.
listener(curr: Stats, prev: Stats) => void-

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:1779


write#

write<TBuffer>(fd, buffer, offset, length, position, callback): void

Type parameters#

NameType
TBufferextends ArrayBufferView

Parameters#

NameType
fdnumber
bufferTBuffer
offsetnumber
lengthnumber
positionnumber | null
callback(err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:264

write<TBuffer>(fd, buffer, offset, length, callback): void

Type parameters#

NameType
TBufferextends ArrayBufferView

Parameters#

NameType
fdnumber
bufferTBuffer
offsetnumber
lengthnumber
callback(err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:268

write(fd, data, callback): void

Parameters#

NameType
fdnumber
dataany
callback(err: NodeJS.ErrnoException, written: number, str: string) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:272

write(fd, data, offset, callback): void

Parameters#

NameType
fdnumber
dataany
offsetnumber
callback(err: NodeJS.ErrnoException, written: number, str: string) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:273

write(fd, data, offset, encoding, callback): void

Parameters#

NameType
fdnumber
dataany
offsetnumber
encodingstring
callback(err: NodeJS.ErrnoException, written: number, str: string) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:274

write<TBuffer>(fd, buffer, offset?, length?, position?): Promise<Object>

Type parameters#

NameType
TBufferextends ArrayBufferView

Parameters#

NameType
fdnumber
bufferTBuffer
offset?number
length?number
position?number | null

Returns#

Promise<Object>

Defined in#

node_modules/@types/fs-extra/index.d.ts:275

write(fd, data, offset?, encoding?): Promise<Object>

Parameters#

NameType
fdnumber
dataany
offset?number
encoding?string

Returns#

Promise<Object>

Defined in#

node_modules/@types/fs-extra/index.d.ts:276


writeFile#

writeFile(file, data, callback): void

Parameters#

NameType
filePathLike | number
dataany
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:278

writeFile(file, data, options?): Promise<void>

Parameters#

NameType
filePathLike | number
dataany
options?WriteFileOptions | string

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:279

writeFile(file, data, options, callback): void

Parameters#

NameType
filePathLike | number
dataany
optionsWriteFileOptions | string
callback(err: NodeJS.ErrnoException) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:280


writeFileSync#

writeFileSync(path, data, options?): void

Synchronously writes data to a file, replacing the file if it already exists.

Parameters#

NameTypeDescription
pathPathLike | numberA path to a file. If a URL is provided, it must use the file: protocol. URL support is experimental. If a file descriptor is provided, the underlying file will not be closed automatically.
datastring | NodeJS.ArrayBufferViewThe data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
options?WriteFileOptionsEither the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. If encoding is not supplied, the default of 'utf8' is used. If mode is not supplied, the default of 0o666 is used. If mode is a string, it is parsed as an octal integer. If flag is not supplied, the default of 'w' is used.

Returns#

void

Defined in#

node_modules/@types/node/fs.d.ts:1713


writeJSON#

writeJSON(file, object, options?): Promise<void>

Parameters#

NameType
filestring
objectany
options?WriteOptions

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:85

writeJSON(file, object, callback): void

Parameters#

NameType
filestring
objectany
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:86

writeJSON(file, object, options, callback): void

Parameters#

NameType
filestring
objectany
optionsWriteOptions
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:87


writeJSONSync#

writeJSONSync(file, object, options?): void

Parameters#

NameType
filestring
objectany
options?WriteOptions

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:93


writeJson#

writeJson(file, object, options?): Promise<void>

Parameters#

NameType
filestring
objectany
options?WriteOptions

Returns#

Promise<void>

Defined in#

node_modules/@types/fs-extra/index.d.ts:88

writeJson(file, object, callback): void

Parameters#

NameType
filestring
objectany
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:89

writeJson(file, object, options, callback): void

Parameters#

NameType
filestring
objectany
optionsWriteOptions
callback(err: Error) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:90


writeJsonSync#

writeJsonSync(file, object, options?): void

Parameters#

NameType
filestring
objectany
options?WriteOptions

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:92


writeSync#

writeSync(fd, buffer, offset?, length?, position?): number

Synchronously writes buffer to the file referenced by the supplied file descriptor, returning the number of bytes written.

Parameters#

NameTypeDescription
fdnumberA file descriptor.
bufferNodeJS.ArrayBufferView-
offset?number | nullThe part of the buffer to be written. If not supplied, defaults to 0.
length?number | nullThe number of bytes to write. If not supplied, defaults to buffer.length - offset.
position?number | nullThe offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.

Returns#

number

Defined in#

node_modules/@types/node/fs.d.ts:1481

writeSync(fd, string, position?, encoding?): number

Synchronously writes string to the file referenced by the supplied file descriptor, returning the number of bytes written.

Parameters#

NameTypeDescription
fdnumberA file descriptor.
stringstringA string to write.
position?number | nullThe offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
encoding?BufferEncoding | nullThe expected string encoding.

Returns#

number

Defined in#

node_modules/@types/node/fs.d.ts:1490


writev#

writev(fd, buffers, position, cb): void

Parameters#

NameType
fdnumber
buffersNodeJS.ArrayBufferView[]
positionnumber
cb(err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:282

writev(fd, buffers, cb): void

Parameters#

NameType
fdnumber
buffersNodeJS.ArrayBufferView[]
cb(err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void

Returns#

void

Defined in#

node_modules/@types/fs-extra/index.d.ts:283

writev(fd, buffers, position?): Promise<WritevResult>

Parameters#

NameType
fdnumber
buffersNodeJS.ArrayBufferView[]
position?number

Returns#

Promise<WritevResult>

Defined in#

node_modules/@types/fs-extra/index.d.ts:284


writevSync#

writevSync(fd, buffers, position?): number

See writev.

Parameters#

NameType
fdnumber
buffersReadonlyArray<NodeJS.ArrayBufferView>
position?number

Returns#

number

Defined in#

node_modules/@types/node/fs.d.ts:2197

  • 没帮助 0