1 |
|
2 |
|
3 | import { Readable, ReadableOptions, Writable, WritableOptions } from "stream";
|
4 | export declare class ReadAfterDestroyedError extends Error {
|
5 | }
|
6 | export declare class ReadAfterReleasedError extends Error {
|
7 | }
|
8 | export interface ReadStreamOptions {
|
9 | highWaterMark?: ReadableOptions["highWaterMark"];
|
10 | encoding?: ReadableOptions["encoding"];
|
11 | }
|
12 | export declare class ReadStream extends Readable {
|
13 | private _pos;
|
14 | private _writeStream;
|
15 | constructor(writeStream: WriteStream, options?: ReadStreamOptions);
|
16 | _read(n: number): void;
|
17 | }
|
18 | export interface WriteStreamOptions {
|
19 | highWaterMark?: WritableOptions["highWaterMark"];
|
20 | defaultEncoding?: WritableOptions["defaultEncoding"];
|
21 | tmpdir?: () => string;
|
22 | }
|
23 | export declare class WriteStream extends Writable {
|
24 | private _fd;
|
25 | private _path;
|
26 | private _pos;
|
27 | private _readStreams;
|
28 | private _released;
|
29 | constructor(options?: WriteStreamOptions);
|
30 | _cleanup: (callback: (error: null | Error) => void) => void;
|
31 | _cleanupSync: () => void;
|
32 | _final(callback: (error?: null | Error) => any): void;
|
33 | _write(chunk: Buffer, encoding: string, callback: (error?: null | Error) => any): void;
|
34 | release(): void;
|
35 | _destroy(error: undefined | null | Error, callback: (error?: null | Error) => any): void;
|
36 | createReadStream(options?: ReadStreamOptions): ReadStream;
|
37 | }
|
38 | declare const _default: {
|
39 | WriteStream: typeof WriteStream;
|
40 | ReadStream: typeof ReadStream;
|
41 | ReadAfterDestroyedError: typeof ReadAfterDestroyedError;
|
42 | ReadAfterReleasedError: typeof ReadAfterReleasedError;
|
43 | };
|
44 | export default _default;
|