frida-fs 5.0.1 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +105 -0
- package/dist/index.js +974 -0
- package/package.json +15 -4
- package/index.js +0 -749
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
/// <reference types="frida-gum" />
|
|
4
|
+
/// <reference types="node" />
|
|
5
|
+
import { Buffer } from "buffer";
|
|
6
|
+
import stream from "stream";
|
|
7
|
+
declare const constants: {
|
|
8
|
+
[x: string]: number;
|
|
9
|
+
};
|
|
10
|
+
declare class ReadStream extends stream.Readable {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(path: string);
|
|
13
|
+
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
14
|
+
_read(size: number): void;
|
|
15
|
+
}
|
|
16
|
+
declare class WriteStream extends stream.Writable {
|
|
17
|
+
#private;
|
|
18
|
+
constructor(path: string);
|
|
19
|
+
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
20
|
+
_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
21
|
+
}
|
|
22
|
+
declare function writeFileSync(path: string, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void;
|
|
23
|
+
declare type ReadFileOptions = BufferEncoding | {
|
|
24
|
+
encoding?: BufferEncoding;
|
|
25
|
+
};
|
|
26
|
+
declare type WriteFileOptions = BufferEncoding | {
|
|
27
|
+
encoding?: BufferEncoding;
|
|
28
|
+
};
|
|
29
|
+
declare const readFileSync: (path: string, options?: ReadFileOptions) => string | Buffer, readlinkSync: (path: string) => string, rmdirSync: (path: string) => void, unlinkSync: (path: string) => void, statSync: (path: string) => Stats, lstatSync: (path: string) => Stats;
|
|
30
|
+
declare function readdirSync(path: string): string[];
|
|
31
|
+
declare function list(path: string): DirectoryEntry[];
|
|
32
|
+
export interface DirectoryEntry {
|
|
33
|
+
name: string;
|
|
34
|
+
type: number;
|
|
35
|
+
atime?: Date;
|
|
36
|
+
mtime?: Date;
|
|
37
|
+
ctime?: Date;
|
|
38
|
+
size?: number;
|
|
39
|
+
}
|
|
40
|
+
declare class Stats {
|
|
41
|
+
dev: number;
|
|
42
|
+
mode: number;
|
|
43
|
+
nlink: number;
|
|
44
|
+
uid: number;
|
|
45
|
+
gid: number;
|
|
46
|
+
rdev: number;
|
|
47
|
+
blksize: number;
|
|
48
|
+
ino: number;
|
|
49
|
+
size: number;
|
|
50
|
+
blocks: number;
|
|
51
|
+
atimeMs: number;
|
|
52
|
+
mtimeMs: number;
|
|
53
|
+
ctimeMs: number;
|
|
54
|
+
birthtimeMs: number;
|
|
55
|
+
atime: Date;
|
|
56
|
+
mtime: Date;
|
|
57
|
+
ctime: Date;
|
|
58
|
+
birthtime: Date;
|
|
59
|
+
buffer: NativePointer;
|
|
60
|
+
isFile(): boolean;
|
|
61
|
+
isDirectory(): boolean;
|
|
62
|
+
isCharacterDevice(): boolean;
|
|
63
|
+
isBlockDevice(): boolean;
|
|
64
|
+
isFIFO(): boolean;
|
|
65
|
+
isSymbolicLink(): boolean;
|
|
66
|
+
isSocket(): boolean;
|
|
67
|
+
}
|
|
68
|
+
declare type AsyncCallback<T> = (error: Error | null, result?: T) => void;
|
|
69
|
+
export declare function createReadStream(path: string): ReadStream;
|
|
70
|
+
export declare function createWriteStream(path: string): WriteStream;
|
|
71
|
+
export declare const readdir: (args_0: string, args_1: AsyncCallback<string[]>) => void;
|
|
72
|
+
export declare const readFile: (args_0: string, args_1: ReadFileOptions | undefined, args_2: AsyncCallback<string | Buffer>) => void;
|
|
73
|
+
export declare const writeFile: (args_0: string, args_1: string | NodeJS.ArrayBufferView, args_2: WriteFileOptions | undefined, args_3: AsyncCallback<void>) => void;
|
|
74
|
+
export declare const readlink: (args_0: string, args_1: AsyncCallback<string>) => void;
|
|
75
|
+
export declare const rmdir: (args_0: string, args_1: AsyncCallback<void>) => void;
|
|
76
|
+
export declare const unlink: (args_0: string, args_1: AsyncCallback<void>) => void;
|
|
77
|
+
export declare const stat: (args_0: string, args_1: AsyncCallback<Stats>) => void;
|
|
78
|
+
export declare const lstat: (args_0: string, args_1: AsyncCallback<Stats>) => void;
|
|
79
|
+
export { constants, readdirSync, list, readFileSync, writeFileSync, readlinkSync, rmdirSync, unlinkSync, statSync, lstatSync, Stats, };
|
|
80
|
+
declare const _default: {
|
|
81
|
+
constants: {
|
|
82
|
+
[x: string]: number;
|
|
83
|
+
};
|
|
84
|
+
createReadStream: typeof createReadStream;
|
|
85
|
+
createWriteStream: typeof createWriteStream;
|
|
86
|
+
readdir: (args_0: string, args_1: AsyncCallback<string[]>) => void;
|
|
87
|
+
readdirSync: typeof readdirSync;
|
|
88
|
+
list: typeof list;
|
|
89
|
+
readFile: (args_0: string, args_1: ReadFileOptions | undefined, args_2: AsyncCallback<string | Buffer>) => void;
|
|
90
|
+
readFileSync: (path: string, options?: ReadFileOptions | undefined) => string | Buffer;
|
|
91
|
+
writeFile: (args_0: string, args_1: string | NodeJS.ArrayBufferView, args_2: WriteFileOptions | undefined, args_3: AsyncCallback<void>) => void;
|
|
92
|
+
writeFileSync: typeof writeFileSync;
|
|
93
|
+
readlink: (args_0: string, args_1: AsyncCallback<string>) => void;
|
|
94
|
+
readlinkSync: (path: string) => string;
|
|
95
|
+
rmdir: (args_0: string, args_1: AsyncCallback<void>) => void;
|
|
96
|
+
rmdirSync: (path: string) => void;
|
|
97
|
+
unlink: (args_0: string, args_1: AsyncCallback<void>) => void;
|
|
98
|
+
unlinkSync: (path: string) => void;
|
|
99
|
+
stat: (args_0: string, args_1: AsyncCallback<Stats>) => void;
|
|
100
|
+
statSync: (path: string) => Stats;
|
|
101
|
+
lstat: (args_0: string, args_1: AsyncCallback<Stats>) => void;
|
|
102
|
+
lstatSync: (path: string) => Stats;
|
|
103
|
+
Stats: typeof Stats;
|
|
104
|
+
};
|
|
105
|
+
export default _default;
|