1 | import * as fs from 'fs';
|
2 | export { createReadStream, createWriteStream, watch, watchFile, unwatchFile, Stats, FSWatcher, ReadStream, WriteStream, constants } from 'fs';
|
3 | export declare function access(path: string, mode?: number | string): Promise<void>;
|
4 | export declare function appendFile(file: string | number, data: any, options?: {
|
5 | encoding?: 'ascii' | 'base64' | 'binary' | 'hex' | 'ucs2' | 'utf16le' | 'utf8';
|
6 | mode?: number | string;
|
7 | flag?: 'r' | 'r+' | 'rs' | 'rs+' | 'w' | 'wx' | 'w+' | 'wx+' | 'a' | 'ax' | 'a+' | 'ax+';
|
8 | }): Promise<void>;
|
9 | export declare function chmod(path: string, mode: number | string): Promise<void>;
|
10 | export declare function chown(path: string, uid: number, gid: number): Promise<void>;
|
11 | export declare function close(fd: number): Promise<void>;
|
12 | export declare function fchmod(fd: number, mode: number | string): Promise<void>;
|
13 | export declare function fchown(fd: number, uid: number, gid: number): Promise<void>;
|
14 | export declare function fstat(fd: number): Promise<fs.Stats>;
|
15 | export declare function ftruncate(fd: number, len?: number): Promise<void>;
|
16 | export declare function futimes(fd: number, atime: Date | number, mtime: Date | number): Promise<void>;
|
17 | export declare function fsync(fd: number): Promise<void>;
|
18 | export declare function lchmod(path: string, mode: number | string): Promise<void>;
|
19 | export declare function lchown(path: string, uid: number, gid: number): Promise<void>;
|
20 | export declare function link(srcpath: string, dstpath: string): Promise<void>;
|
21 | export declare function lstat(path: string): Promise<fs.Stats>;
|
22 | export declare function mkdir(path: string, mode?: number | string): Promise<void>;
|
23 | export declare function mkdtemp(path: string): Promise<string>;
|
24 | export declare function open(path: string, flags: 'r' | 'r+' | 'rs' | 'rs+' | 'w' | 'wx' | 'w+' | 'wx+' | 'a' | 'ax' | 'a+' | 'ax+', mode?: number | string): Promise<number>;
|
25 | export declare function read(fd: number, buffer: Buffer, offset: number, length: number, position: number): Promise<{
|
26 | bytesRead: number;
|
27 | buffer: Buffer;
|
28 | }>;
|
29 | export declare function readdir(path: string): Promise<string[]>;
|
30 | export declare function readFile(file: string | number, options?: {
|
31 | encoding?: 'ascii' | 'base64' | 'binary' | 'hex' | 'ucs2' | 'utf16le' | 'utf8';
|
32 | flag?: 'r' | 'r+' | 'rs' | 'rs+' | 'w' | 'wx' | 'w+' | 'wx+' | 'a' | 'ax' | 'a+' | 'ax+';
|
33 | } | 'ascii' | 'base64' | 'binary' | 'hex' | 'ucs2' | 'utf16le' | 'utf8' | 'r' | 'r+' | 'rs' | 'rs+' | 'w' | 'wx' | 'w+' | 'wx+' | 'a' | 'ax' | 'a+' | 'ax+'): Promise<any>;
|
34 | export declare function readlink(path: string): Promise<string>;
|
35 | export declare function realpath(path: string, cache?: {
|
36 | [path: string]: string;
|
37 | }): Promise<string>;
|
38 | export declare function rename(oldPath: string, newPath: string): Promise<void>;
|
39 | export declare function rmdir(path: string): Promise<void>;
|
40 | export declare function stat(path: string): Promise<fs.Stats>;
|
41 | export declare function symlink(srcpath: string, dstpath: string, type?: string): Promise<void>;
|
42 | export declare function truncate(path: string, len?: number): Promise<void>;
|
43 | export declare function unlink(path: string): Promise<void>;
|
44 | export declare function utimes(path: string, atime: Date | number, mtime: Date | number): Promise<void>;
|
45 | export declare function write(fd: number, buffer: Buffer, offset: number, length: number, position?: number): Promise<{
|
46 | written: number;
|
47 | buffer: Buffer;
|
48 | }>;
|
49 | export declare function write(fd: number, data: any, offset?: number, encoding?: 'ascii' | 'base64' | 'binary' | 'hex' | 'ucs2' | 'utf16le' | 'utf8'): Promise<{
|
50 | written: number;
|
51 | buffer: Buffer;
|
52 | }>;
|
53 | export declare function writeFile(file: string | number, data: string | any, options?: {
|
54 | encoding?: 'ascii' | 'base64' | 'binary' | 'hex' | 'ucs2' | 'utf16le' | 'utf8';
|
55 | flag?: 'r' | 'r+' | 'rs' | 'rs+' | 'w' | 'wx' | 'w+' | 'wx+' | 'a' | 'ax' | 'a+' | 'ax+';
|
56 | mode?: number | string;
|
57 | } | 'ascii' | 'base64' | 'binary' | 'hex' | 'ucs2' | 'utf16le' | 'utf8' | 'r' | 'r+' | 'rs' | 'rs+' | 'w' | 'wx' | 'w+' | 'wx+' | 'a' | 'ax' | 'a+' | 'ax+'): Promise<void>;
|
58 | export declare function readTextFile(file: string | number, encoding?: 'ascii' | 'base64' | 'binary' | 'hex' | 'ucs2' | 'utf16le' | 'utf8', flags?: 'r' | 'r+' | 'rs' | 'rs+' | 'w' | 'wx' | 'w+' | 'wx+' | 'a' | 'ax' | 'a+' | 'ax+'): Promise<string>;
|
59 | export declare function writeTextFile(file: string | number, data: string, encoding?: 'ascii' | 'base64' | 'binary' | 'hex' | 'ucs2' | 'utf16le' | 'utf8', flags?: 'r' | 'r+' | 'rs' | 'rs+' | 'w' | 'wx' | 'w+' | 'wx+' | 'a' | 'ax' | 'a+' | 'ax+', mode?: number | string): Promise<void>;
|
60 | export declare function createDirectory(path: string, mode?: number | string): Promise<void>;
|
61 | export { createDirectory as mkdirp };
|
62 | declare function del(path: string): Promise<void>;
|
63 | export { del as delete };
|
64 | export { del as rimraf };
|
65 | export declare function exists(path: string): Promise<boolean>;
|