Dynamic module fs

Index

Interfaces

Classes

Functions

Functions

appendFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void)

Parameters

  • filename: string
  • data: any
  • options: { encoding?: string; mode?: number; flag?: string; }
  • callback?: (err: NodeJS.ErrnoException) => void optional

appendFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void)

Parameters

  • filename: string
  • data: any
  • options: { encoding?: string; mode?: string; flag?: string; }
  • callback?: (err: NodeJS.ErrnoException) => void optional

appendFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void)

Parameters

  • filename: string
  • data: any
  • callback?: (err: NodeJS.ErrnoException) => void optional

appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; })

Parameters

  • filename: string
  • data: any
  • options?: { encoding?: string; mode?: number; flag?: string; } optional

appendFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; })

Parameters

  • filename: string
  • data: any
  • options?: { encoding?: string; mode?: string; flag?: string; } optional

chmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • path: string
  • mode: number
  • callback?: (err?: NodeJS.ErrnoException) => void optional

chmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • path: string
  • mode: string
  • callback?: (err?: NodeJS.ErrnoException) => 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?: NodeJS.ErrnoException) => void)

Parameters

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

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

Parameters

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

close(fd: number, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • fd: number
  • callback?: (err?: NodeJS.ErrnoException) => void optional

closeSync(fd: number)

Parameters

  • fd: number

createReadStream(path: string, options?: { flags?: string; encoding?: string; fd?: string; mode?: number; bufferSize?: number; }): ReadStream

Parameters

  • path: string
  • options?: { flags?: string; encoding?: string; fd?: string; mode?: number; bufferSize?: number; } optional

Returns

ReadStream

createReadStream(path: string, options?: { flags?: string; encoding?: string; fd?: string; mode?: string; bufferSize?: number; }): ReadStream

Parameters

  • path: string
  • options?: { flags?: string; encoding?: string; fd?: string; mode?: string; bufferSize?: number; } optional

Returns

ReadStream

createWriteStream(path: string, options?: { flags?: string; encoding?: string; string?: string; }): WriteStream

Parameters

  • path: string
  • options?: { flags?: string; encoding?: string; string?: string; } optional

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?: NodeJS.ErrnoException) => void)

Parameters

  • fd: number
  • mode: number
  • callback?: (err?: NodeJS.ErrnoException) => void optional

fchmod(fd: number, mode: string, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • fd: number
  • mode: string
  • callback?: (err?: NodeJS.ErrnoException) => 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?: NodeJS.ErrnoException) => void)

Parameters

  • fd: number
  • uid: number
  • gid: number
  • callback?: (err?: NodeJS.ErrnoException) => void optional

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

Parameters

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

fstat(fd: number, callback?: (err: NodeJS.ErrnoException, stats: "fs".Stats) => any)

Parameters

  • fd: number
  • callback?: (err: NodeJS.ErrnoException, stats: "fs".Stats) => any optional

fstatSync(fd: number): Stats

Parameters

  • fd: number

Returns

Stats

fsync(fd: number, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • fd: number
  • callback?: (err?: NodeJS.ErrnoException) => void optional

fsyncSync(fd: number)

Parameters

  • fd: number

ftruncate(fd: number, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • fd: number
  • callback?: (err?: NodeJS.ErrnoException) => void optional

ftruncate(fd: number, len: number, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • fd: number
  • len: number
  • callback?: (err?: NodeJS.ErrnoException) => void optional

ftruncateSync(fd: number, len?: number)

Parameters

  • fd: number
  • len?: number optional

futimes(fd: number, atime: number, mtime: number, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • fd: number
  • atime: number
  • mtime: number
  • callback?: (err?: NodeJS.ErrnoException) => void optional

futimes(fd: number, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • fd: number
  • atime: Date
  • mtime: Date
  • callback?: (err?: NodeJS.ErrnoException) => void optional

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

Parameters

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

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

Parameters

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

lchmod(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • path: string
  • mode: number
  • callback?: (err?: NodeJS.ErrnoException) => void optional

lchmod(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • path: string
  • mode: string
  • callback?: (err?: NodeJS.ErrnoException) => 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?: NodeJS.ErrnoException) => void)

Parameters

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

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

Parameters

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

link(srcpath: string, dstpath: string, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • srcpath: string
  • dstpath: string
  • callback?: (err?: NodeJS.ErrnoException) => void optional

linkSync(srcpath: string, dstpath: string)

Parameters

  • srcpath: string
  • dstpath: string

lstat(path: string, callback?: (err: NodeJS.ErrnoException, stats: "fs".Stats) => any)

Parameters

  • path: string
  • callback?: (err: NodeJS.ErrnoException, stats: "fs".Stats) => any optional

lstatSync(path: string): Stats

Parameters

  • path: string

Returns

Stats

mkdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • path: string
  • callback?: (err?: NodeJS.ErrnoException) => void optional

mkdir(path: string, mode: number, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • path: string
  • mode: number
  • callback?: (err?: NodeJS.ErrnoException) => void optional

mkdir(path: string, mode: string, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • path: string
  • mode: string
  • callback?: (err?: NodeJS.ErrnoException) => void optional

mkdirSync(path: string, mode?: number)

Parameters

  • path: string
  • mode?: number optional

mkdirSync(path: string, mode?: string)

Parameters

  • path: string
  • mode?: string optional

open(path: string, flags: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any)

Parameters

  • path: string
  • flags: string
  • callback?: (err: NodeJS.ErrnoException, fd: number) => any optional

open(path: string, flags: string, mode: number, callback?: (err: NodeJS.ErrnoException, fd: number) => any)

Parameters

  • path: string
  • flags: string
  • mode: number
  • callback?: (err: NodeJS.ErrnoException, fd: number) => any optional

open(path: string, flags: string, mode: string, callback?: (err: NodeJS.ErrnoException, fd: number) => any)

Parameters

  • path: string
  • flags: string
  • mode: string
  • callback?: (err: NodeJS.ErrnoException, fd: number) => any optional

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

Parameters

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

Returns

number

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

Parameters

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

Returns

number

read(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void)

Parameters

  • fd: number
  • buffer: Buffer
  • offset: number
  • length: number
  • position: number
  • callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void optional

readFile(filename: string, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void)

Parameters

  • filename: string
  • encoding: string
  • callback: (err: NodeJS.ErrnoException, data: string) => void

readFile(filename: string, options: { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: string) => void)

Parameters

  • filename: string
  • options: { encoding: string; flag?: string; }
  • callback: (err: NodeJS.ErrnoException, data: string) => void

readFile(filename: string, options: { flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void)

Parameters

  • filename: string
  • options: { flag?: string; }
  • callback: (err: NodeJS.ErrnoException, data: Buffer) => void

readFile(filename: string, callback: (err: NodeJS.ErrnoException, data: Buffer) => void)

Parameters

  • filename: string
  • callback: (err: NodeJS.ErrnoException, data: Buffer) => void

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

Parameters

  • filename: string
  • encoding: string

Returns

string

readFileSync(filename: string, options: { encoding: string; flag?: string; }): string

Parameters

  • filename: string
  • options: { encoding: string; flag?: string; }

Returns

string

readFileSync(filename: string, options?: { flag?: string; }): Buffer

Parameters

  • filename: string
  • options?: { flag?: string; } optional

Returns

Buffer

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

Parameters

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

Returns

number

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

Parameters

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

readdirSync(path: string): Array<string>

Parameters

  • path: string

Returns

Array<string>

readlink(path: string, callback?: (err: NodeJS.ErrnoException, linkString: string) => any)

Parameters

  • path: string
  • callback?: (err: NodeJS.ErrnoException, linkString: string) => any optional

readlinkSync(path: string): string

Parameters

  • path: string

Returns

string

realpath(path: string, callback?: (err: NodeJS.ErrnoException, resolvedPath: string) => any)

Parameters

  • path: string
  • callback?: (err: NodeJS.ErrnoException, resolvedPath: string) => any optional

realpath(path: string, cache: { [path: string]: string; }, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any)

Parameters

  • path: string
  • cache: { [path: string]: string; }
  • callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any

realpathSync(path: string, cache?: { [path: string]: string; }): string

Parameters

  • path: string
  • cache?: { [path: string]: string; } optional

Returns

string

rename(oldPath: string, newPath: string, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • oldPath: string
  • newPath: string
  • callback?: (err?: NodeJS.ErrnoException) => void optional

renameSync(oldPath: string, newPath: string)

Parameters

  • oldPath: string
  • newPath: string

rmdir(path: string, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • path: string
  • callback?: (err?: NodeJS.ErrnoException) => void optional

rmdirSync(path: string)

Parameters

  • path: string

stat(path: string, callback?: (err: NodeJS.ErrnoException, stats: "fs".Stats) => any)

Parameters

  • path: string
  • callback?: (err: NodeJS.ErrnoException, stats: "fs".Stats) => any optional

statSync(path: string): Stats

Parameters

  • path: string

Returns

Stats

symlink(srcpath: string, dstpath: string, type?: string, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • srcpath: string
  • dstpath: string
  • type?: string optional
  • callback?: (err?: NodeJS.ErrnoException) => void optional

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

Parameters

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

truncate(path: string, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • path: string
  • callback?: (err?: NodeJS.ErrnoException) => void optional

truncate(path: string, len: number, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • path: string
  • len: number
  • callback?: (err?: NodeJS.ErrnoException) => void optional

truncateSync(path: string, len?: number)

Parameters

  • path: string
  • len?: number optional

unlink(path: string, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • path: string
  • callback?: (err?: NodeJS.ErrnoException) => void optional

unlinkSync(path: string)

Parameters

  • path: string

unwatchFile(filename: string, listener?: (curr: "fs".Stats, prev: "fs".Stats) => void)

Parameters

  • filename: string
  • listener?: (curr: "fs".Stats, prev: "fs".Stats) => void optional

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

Parameters

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

utimes(path: string, atime: Date, mtime: Date, callback?: (err?: NodeJS.ErrnoException) => void)

Parameters

  • path: string
  • atime: Date
  • mtime: Date
  • callback?: (err?: NodeJS.ErrnoException) => void optional

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

Parameters

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

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

Parameters

  • path: string
  • atime: Date
  • mtime: Date

watch(filename: string, listener?: (event: string, filename: string) => any): FSWatcher

Parameters

  • filename: string
  • listener?: (event: string, filename: string) => any optional

Returns

FSWatcher

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

Parameters

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

Returns

FSWatcher

watchFile(filename: string, listener: (curr: "fs".Stats, prev: "fs".Stats) => void)

Parameters

  • filename: string
  • listener: (curr: "fs".Stats, prev: "fs".Stats) => void

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

Parameters

  • filename: string
  • options: { persistent?: boolean; interval?: number; }
  • listener: (curr: "fs".Stats, prev: "fs".Stats) => void

write(fd: number, buffer: Buffer, offset: number, length: number, position: number, callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void)

Parameters

  • fd: number
  • buffer: Buffer
  • offset: number
  • length: number
  • position: number
  • callback?: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void optional

writeFile(filename: string, data: any, callback?: (err: NodeJS.ErrnoException) => void)

Parameters

  • filename: string
  • data: any
  • callback?: (err: NodeJS.ErrnoException) => void optional

writeFile(filename: string, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void)

Parameters

  • filename: string
  • data: any
  • options: { encoding?: string; mode?: number; flag?: string; }
  • callback?: (err: NodeJS.ErrnoException) => void optional

writeFile(filename: string, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void)

Parameters

  • filename: string
  • data: any
  • options: { encoding?: string; mode?: string; flag?: string; }
  • callback?: (err: NodeJS.ErrnoException) => void optional

writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; })

Parameters

  • filename: string
  • data: any
  • options?: { encoding?: string; mode?: number; flag?: string; } optional

writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; })

Parameters

  • filename: string
  • data: any
  • options?: { encoding?: string; mode?: string; flag?: string; } optional

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

Parameters

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

Returns

number