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