write-entry.d.ts
4.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import { type Stats } from 'fs';
import { Minipass } from 'minipass';
import { Header } from './header.js';
import type { TarOptions, TarOptionsWithAliases } from './options.js';
import type { ReadEntry } from './read-entry.js';
import type { EntryTypeName } from './types.js';
import type { WarnData, Warner, WarnEvent } from './warn-method.js';
declare const PROCESS: unique symbol;
declare const FILE: unique symbol;
declare const DIRECTORY: unique symbol;
declare const SYMLINK: unique symbol;
declare const HARDLINK: unique symbol;
declare const HEADER: unique symbol;
declare const READ: unique symbol;
declare const LSTAT: unique symbol;
declare const ONLSTAT: unique symbol;
declare const ONREAD: unique symbol;
declare const ONREADLINK: unique symbol;
declare const OPENFILE: unique symbol;
declare const ONOPENFILE: unique symbol;
declare const CLOSE: unique symbol;
declare const MODE: unique symbol;
declare const AWAITDRAIN: unique symbol;
declare const ONDRAIN: unique symbol;
declare const PREFIX: unique symbol;
export declare class WriteEntry extends Minipass<Buffer, Minipass.ContiguousData, WarnEvent> implements Warner {
#private;
path: string;
portable: boolean;
myuid: number;
myuser: string;
maxReadSize: number;
linkCache: Exclude<TarOptions['linkCache'], undefined>;
statCache: Exclude<TarOptions['statCache'], undefined>;
preservePaths: boolean;
cwd: string;
strict: boolean;
mtime?: Date;
noPax: boolean;
noMtime: boolean;
prefix?: string;
fd?: number;
blockLen: number;
blockRemain: number;
buf?: Buffer;
pos: number;
remain: number;
length: number;
offset: number;
win32: boolean;
absolute: string;
header?: Header;
type?: EntryTypeName | 'Unsupported';
linkpath?: string;
stat?: Stats;
onWriteEntry?: (entry: WriteEntry) => unknown;
constructor(p: string, opt_?: TarOptionsWithAliases);
warn(code: string, message: string | Error, data?: WarnData): void;
emit(ev: keyof WarnEvent, ...data: unknown[]): boolean;
[LSTAT](): void;
[ONLSTAT](stat: Stats): void;
[PROCESS](): void | this;
[MODE](mode: number): number;
[PREFIX](path: string): string;
[HEADER](): void;
[DIRECTORY](): void;
[SYMLINK](): void;
[ONREADLINK](linkpath: string): void;
[HARDLINK](linkpath: string): void;
[FILE](): void | this;
[OPENFILE](): void;
[ONOPENFILE](fd: number): void;
[READ](): void;
[CLOSE](cb?: (er?: null | Error | NodeJS.ErrnoException) => unknown): void;
[ONREAD](bytesRead: number): void;
[AWAITDRAIN](cb: () => unknown): void;
write(buffer: Buffer | string, cb?: () => void): boolean;
write(str: Buffer | string, encoding?: BufferEncoding | null, cb?: () => void): boolean;
[ONDRAIN](): void;
}
export declare class WriteEntrySync extends WriteEntry implements Warner {
sync: true;
[LSTAT](): void;
[SYMLINK](): void;
[OPENFILE](): void;
[READ](): void;
[AWAITDRAIN](cb: () => unknown): void;
[CLOSE](cb?: (er?: null | Error | NodeJS.ErrnoException) => unknown): void;
}
export declare class WriteEntryTar extends Minipass<Buffer, Buffer | string, WarnEvent> implements Warner {
blockLen: number;
blockRemain: number;
buf: number;
pos: number;
remain: number;
length: number;
preservePaths: boolean;
portable: boolean;
strict: boolean;
noPax: boolean;
noMtime: boolean;
readEntry: ReadEntry;
type: EntryTypeName;
prefix?: string;
path: string;
mode?: number;
uid?: number;
gid?: number;
uname?: string;
gname?: string;
header?: Header;
mtime?: Date;
atime?: Date;
ctime?: Date;
linkpath?: string;
size: number;
onWriteEntry?: (entry: WriteEntry) => unknown;
warn(code: string, message: string | Error, data?: WarnData): void;
constructor(readEntry: ReadEntry, opt_?: TarOptionsWithAliases);
[PREFIX](path: string): string;
[MODE](mode: number): number;
write(buffer: Buffer | string, cb?: () => void): boolean;
write(str: Buffer | string, encoding?: BufferEncoding | null, cb?: () => void): boolean;
end(cb?: () => void): this;
end(chunk: Buffer | string, cb?: () => void): this;
end(chunk: Buffer | string, encoding?: BufferEncoding, cb?: () => void): this;
}
export {};
//# sourceMappingURL=write-entry.d.ts.map