Dynamic module fs-extra

Index

Interfaces

Classes

Functions

Functions

appendFile(filename: string, data: any, encoding?: string, callback?: (err: Error) => void)

Parameters

  • filename: string
  • data: any
  • encoding?: string optional
  • callback?: (err: Error) => void optional

appendFile(filename: string, data: any, option?: OpenOptions, callback?: (err: Error) => void)

Parameters

  • filename: string
  • data: any
  • option?: OpenOptions optional
  • callback?: (err: Error) => void optional

appendFileSync(filename: string, data: any, encoding?: string)

Parameters

  • filename: string
  • data: any
  • encoding?: string optional

appendFileSync(filename: string, data: any, option?: OpenOptions)

Parameters

  • filename: string
  • data: any
  • option?: OpenOptions optional

chmod(path: string, mode: number, callback?: (err: Error) => void)

Parameters

  • path: string
  • mode: number
  • callback?: (err: Error) => void optional

chmod(path: string, mode: string, callback?: (err: Error) => void)

Parameters

  • path: string
  • mode: string
  • callback?: (err: Error) => void optional

chmodSync(path: string, mode: number)

Parameters

  • path: string
  • mode: number

chmodSync(path: string, mode: string)

Parameters

  • path: string
  • mode: string

chown(path: string, uid: number, gid: number, callback?: (err: Error) => void)

Parameters

  • path: string
  • uid: number
  • gid: number
  • callback?: (err: Error) => void optional

chownSync(path: string, uid: number, gid: number)

Parameters

  • path: string
  • uid: number
  • gid: number

close(fd: number, callback?: (err: Error) => void)

Parameters

  • fd: number
  • callback?: (err: Error) => void optional

closeSync(fd: number)

Parameters

  • fd: number

copy(src: string, dest: string, callback?: (err: Error) => void)

Parameters

  • src: string
  • dest: string
  • callback?: (err: Error) => void optional

copy(src: string, dest: string, filter: (src: string) => boolean, callback?: (err: Error) => void)

Parameters

  • src: string
  • dest: string
  • filter: (src: string) => boolean
  • callback?: (err: Error) => void optional

copySync(src: string, dest: string)

Parameters

  • src: string
  • dest: string

copySync(src: string, dest: string, filter: (src: string) => boolean)

Parameters

  • src: string
  • dest: string
  • filter: (src: string) => boolean

createFile(file: string, callback?: (err: Error) => void)

Parameters

  • file: string
  • callback?: (err: Error) => void optional

createFileSync(file: string)

Parameters

  • file: string

createReadStream(path: string, options?: ReadStreamOptions): ReadStream

Parameters

Returns

ReadStream

createWriteStream(path: string, options?: WriteStreamOptions): WriteStream

Parameters

Returns

WriteStream

exists(path: string, callback?: (exists: boolean) => void)

Parameters

  • path: string
  • callback?: (exists: boolean) => void optional

existsSync(path: string): boolean

Parameters

  • path: string

Returns

boolean

fchmod(fd: number, mode: number, callback?: (err: Error) => void)

Parameters

  • fd: number
  • mode: number
  • callback?: (err: Error) => void optional

fchmod(fd: number, mode: string, callback?: (err: Error) => void)

Parameters

  • fd: number
  • mode: string
  • callback?: (err: Error) => void optional

fchmodSync(fd: number, mode: number)

Parameters

  • fd: number
  • mode: number

fchmodSync(fd: number, mode: string)

Parameters

  • fd: number
  • mode: string

fchown(fd: number, uid: number, gid: number, callback?: (err: Error) => void)

Parameters

  • fd: number
  • uid: number
  • gid: number
  • callback?: (err: Error) => void optional

fchownSync(fd: number, uid: number, gid: number)

Parameters

  • fd: number
  • uid: number
  • gid: number

fstat(fd: number, callback?: (err: Error, stats: "fs-extra".Stats) => void)

Parameters

  • fd: number
  • callback?: (err: Error, stats: "fs-extra".Stats) => void optional

fstatSync(fd: number): Stats

Parameters

  • fd: number

Returns

Stats

fsync(fd: number, callback?: (err: Error) => void)

Parameters

  • fd: number
  • callback?: (err: Error) => void optional

fsyncSync(fd: number)

Parameters

  • fd: number

futimes(fd: number, atime: number, mtime: number, callback?: (err: Error) => void)

Parameters

  • fd: number
  • atime: number
  • mtime: number
  • callback?: (err: Error) => void optional

futimesSync(fd: number, atime: number, mtime: number)

Parameters

  • fd: number
  • atime: number
  • mtime: number

lchmod(path: string, mode: string, callback?: (err: Error) => void)

Parameters

  • path: string
  • mode: string
  • callback?: (err: Error) => void optional

lchmod(path: string, mode: number, callback?: (err: Error) => void)

Parameters

  • path: string
  • mode: number
  • callback?: (err: Error) => void optional

lchmodSync(path: string, mode: number)

Parameters

  • path: string
  • mode: number

lchmodSync(path: string, mode: string)

Parameters

  • path: string
  • mode: string

lchown(path: string, uid: number, gid: number, callback?: (err: Error) => void)

Parameters

  • path: string
  • uid: number
  • gid: number
  • callback?: (err: Error) => void optional

lchownSync(path: string, uid: number, gid: number)

Parameters

  • path: string
  • uid: number
  • gid: number

link(srcpath: string, dstpath: string, callback?: (err: Error) => void)

Parameters

  • srcpath: string
  • dstpath: string
  • callback?: (err: Error) => void optional

linkSync(srcpath: string, dstpath: string)

Parameters

  • srcpath: string
  • dstpath: string

lstat(path: string, callback?: (err: Error, stats: "fs-extra".Stats) => void)

Parameters

  • path: string
  • callback?: (err: Error, stats: "fs-extra".Stats) => void optional

lstatSync(path: string): Stats

Parameters

  • path: string

Returns

Stats

mkdir(path: string, mode?: number, callback?: (err: Error) => void)

Parameters

  • path: string
  • mode?: number optional
  • callback?: (err: Error) => void optional

mkdir(path: string, mode?: string, callback?: (err: Error) => void)

Parameters

  • path: string
  • mode?: string optional
  • callback?: (err: Error) => void optional

mkdirSync(path: string, mode?: number)

Parameters

  • path: string
  • mode?: number optional

mkdirSync(path: string, mode?: string)

Parameters

  • path: string
  • mode?: string optional

mkdirp(dir: string, callback?: (err: Error) => void)

Parameters

  • dir: string
  • callback?: (err: Error) => void optional

mkdirpSync(dir: string)

Parameters

  • dir: string

mkdirs(dir: string, callback?: (err: Error) => void)

Parameters

  • dir: string
  • callback?: (err: Error) => void optional

mkdirsSync(dir: string)

Parameters

  • dir: string

open(path: string, flags: string, mode?: string, callback?: (err: Error, fs: number) => void)

Parameters

  • path: string
  • flags: string
  • mode?: string optional
  • callback?: (err: Error, fs: number) => void optional

openSync(path: string, flags: string, mode?: string): number

Parameters

  • path: string
  • flags: string
  • mode?: string optional

Returns

number

outputFile(file: string, data: any, callback?: (err: Error) => void)

Parameters

  • file: string
  • data: any
  • callback?: (err: Error) => void optional

outputFileSync(file: string, data: any)

Parameters

  • file: string
  • data: any

outputJSON(file: string, data: any, callback?: (err: Error) => void)

Parameters

  • file: string
  • data: any
  • callback?: (err: Error) => void optional

outputJSONSync(file: string, data: any)

Parameters

  • file: string
  • data: any

outputJson(file: string, data: any, callback?: (err: Error) => void)

Parameters

  • file: string
  • data: any
  • callback?: (err: Error) => void optional

outputJsonSync(file: string, data: any)

Parameters

  • file: string
  • data: any

read(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, bytesRead: number, buffer: NodeBuffer) => void)

Parameters

  • fd: number
  • buffer: NodeBuffer
  • offset: number
  • length: number
  • position: number
  • callback?: (err: Error, bytesRead: number, buffer: NodeBuffer) => void optional

readFile(filename: string, encoding: string, callback: (err: Error, data: string) => void)

Parameters

  • filename: string
  • encoding: string
  • callback: (err: Error, data: string) => void

readFile(filename: string, options: OpenOptions, callback: (err: Error, data: string) => void)

Parameters

  • filename: string
  • options: OpenOptions
  • callback: (err: Error, data: string) => void

readFile(filename: string, callback: (err: Error, data: NodeBuffer) => void)

Parameters

  • filename: string
  • callback: (err: Error, data: NodeBuffer) => void

readFileSync(filename: string): NodeBuffer

Parameters

  • filename: string

Returns

NodeBuffer

readFileSync(filename: string, encoding: string): string

Parameters

  • filename: string
  • encoding: string

Returns

string

readFileSync(filename: string, options: OpenOptions): string

Parameters

Returns

string

readJSON(file: string, callback?: (err: Error) => void)

Parameters

  • file: string
  • callback?: (err: Error) => void optional

readJSON(file: string, options?: OpenOptions, callback?: (err: Error) => void)

Parameters

  • file: string
  • options?: OpenOptions optional
  • callback?: (err: Error) => void optional

readJSONSync(file: string, options?: OpenOptions)

Parameters

readJson(file: string, callback?: (err: Error) => void)

Parameters

  • file: string
  • callback?: (err: Error) => void optional

readJson(file: string, options?: OpenOptions, callback?: (err: Error) => void)

Parameters

  • file: string
  • options?: OpenOptions optional
  • callback?: (err: Error) => void optional

readJsonSync(file: string, options?: OpenOptions)

Parameters

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

Parameters

  • fd: number
  • buffer: NodeBuffer
  • offset: number
  • length: number
  • position: number

Returns

number

readdir(path: string, callback?: (err: Error, files: string[]) => void)

Parameters

  • path: string
  • callback?: (err: Error, files: string[]) => void optional

readdirSync(path: string): Array<string>

Parameters

  • path: string

Returns

Array<string>

readlink(path: string, callback?: (err: Error, linkString: string) => void)

Parameters

  • path: string
  • callback?: (err: Error, linkString: string) => void optional

realpath(path: string, callback?: (err: Error, resolvedPath: string) => void)

Parameters

  • path: string
  • callback?: (err: Error, resolvedPath: string) => void optional

realpath(path: string, cache: string, callback: (err: Error, resolvedPath: string) => void)

Parameters

  • path: string
  • cache: string
  • callback: (err: Error, resolvedPath: string) => void

realpathSync(path: string, cache?: boolean): string

Parameters

  • path: string
  • cache?: boolean optional

Returns

string

remove(dir: string, callback?: (err: Error) => void)

Parameters

  • dir: string
  • callback?: (err: Error) => void optional

removeSync(dir: string)

Parameters

  • dir: string

rename(oldPath: string, newPath: string, callback?: (err: Error) => void)

Parameters

  • oldPath: string
  • newPath: string
  • callback?: (err: Error) => void optional

renameSync(oldPath: string, newPath: string)

Parameters

  • oldPath: string
  • newPath: string

rmdir(path: string, callback?: (err: Error) => void)

Parameters

  • path: string
  • callback?: (err: Error) => void optional

rmdirSync(path: string)

Parameters

  • path: string

stat(path: string, callback?: (err: Error, stats: "fs-extra".Stats) => void)

Parameters

  • path: string
  • callback?: (err: Error, stats: "fs-extra".Stats) => void optional

statSync(path: string): Stats

Parameters

  • path: string

Returns

Stats

symlink(srcpath: string, dstpath: string, type?: string, callback?: (err: Error) => void)

Parameters

  • srcpath: string
  • dstpath: string
  • type?: string optional
  • callback?: (err: Error) => void optional

symlinkSync(srcpath: string, dstpath: string, type?: string)

Parameters

  • srcpath: string
  • dstpath: string
  • type?: string optional

truncate(fd: number, len: number, callback?: (err: Error) => void)

Parameters

  • fd: number
  • len: number
  • callback?: (err: Error) => void optional

truncateSync(fd: number, len: number)

Parameters

  • fd: number
  • len: number

unlink(path: string, callback?: (err: Error) => void)

Parameters

  • path: string
  • callback?: (err: Error) => void optional

unlinkSync(path: string)

Parameters

  • path: string

unwatchFile(filename: string, listener?: Stats)

Parameters

  • filename: string
  • listener?: Stats optional

utimes(path: string, atime: number, mtime: number, callback?: (err: Error) => void)

Parameters

  • path: string
  • atime: number
  • mtime: number
  • callback?: (err: Error) => void optional

utimesSync(path: string, atime: number, mtime: number)

Parameters

  • path: string
  • atime: number
  • mtime: number

watch(filename: string, options?: { persistent?: boolean; }, listener?: (event: string, filename: string) => any): FSWatcher

Parameters

  • filename: string
  • options?: { persistent?: boolean; } optional
  • listener?: (event: string, filename: string) => any optional

Returns

FSWatcher

watchFile(filename: string, listener: { curr: "fs-extra".Stats; prev: "fs-extra".Stats; })

Parameters

  • filename: string
  • listener: { curr: "fs-extra".Stats; prev: "fs-extra".Stats; }

watchFile(filename: string, options: { persistent?: boolean; interval?: number; }, listener: { curr: "fs-extra".Stats; prev: "fs-extra".Stats; })

Parameters

  • filename: string
  • options: { persistent?: boolean; interval?: number; }
  • listener: { curr: "fs-extra".Stats; prev: "fs-extra".Stats; }

write(fd: number, buffer: NodeBuffer, offset: number, length: number, position: number, callback?: (err: Error, written: number, buffer: NodeBuffer) => void)

Parameters

  • fd: number
  • buffer: NodeBuffer
  • offset: number
  • length: number
  • position: number
  • callback?: (err: Error, written: number, buffer: NodeBuffer) => void optional

writeFile(filename: string, data: any, encoding?: string, callback?: (err: Error) => void)

Parameters

  • filename: string
  • data: any
  • encoding?: string optional
  • callback?: (err: Error) => void optional

writeFile(filename: string, data: any, options?: OpenOptions, callback?: (err: Error) => void)

Parameters

  • filename: string
  • data: any
  • options?: OpenOptions optional
  • callback?: (err: Error) => void optional

writeFileSync(filename: string, data: any, encoding?: string)

Parameters

  • filename: string
  • data: any
  • encoding?: string optional

writeFileSync(filename: string, data: any, option?: OpenOptions)

Parameters

  • filename: string
  • data: any
  • option?: OpenOptions optional

writeJSON(file: string, object: any, callback?: (err: Error) => void)

Parameters

  • file: string
  • object: any
  • callback?: (err: Error) => void optional

writeJSON(file: string, object: any, options?: OpenOptions, callback?: (err: Error) => void)

Parameters

  • file: string
  • object: any
  • options?: OpenOptions optional
  • callback?: (err: Error) => void optional

writeJSONSync(file: string, object: any, options?: OpenOptions)

Parameters

  • file: string
  • object: any
  • options?: OpenOptions optional

writeJson(file: string, object: any, callback?: (err: Error) => void)

Parameters

  • file: string
  • object: any
  • callback?: (err: Error) => void optional

writeJson(file: string, object: any, options?: OpenOptions, callback?: (err: Error) => void)

Parameters

  • file: string
  • object: any
  • options?: OpenOptions optional
  • callback?: (err: Error) => void optional

writeJsonSync(file: string, object: any, options?: OpenOptions)

Parameters

  • file: string
  • object: any
  • options?: OpenOptions optional

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

Parameters

  • fd: number
  • buffer: NodeBuffer
  • offset: number
  • length: number
  • position: number

Returns

number