Returns {
close: (() => Promise<void>);
flush: (() => void);
getUsageCount: (() => number);
isFileStreamOpen: (() => boolean);
open: (() => Promise<string>);
read: (() => Promise<string>);
subscribe: (() => Promise<void>);
unsubscribe: (() => Promise<void>);
write: ((data: string) => boolean);
}
An object with the following file stream management functions:
close: (() => Promise<void>)
- (): Promise<void>
Returns Promise<void>
flush: (() => void)
getUsageCount: (() => number)
isFileStreamOpen: (() => boolean)
- (): boolean
Returns boolean
open: (() => Promise<string>)
- (): Promise<string>
Returns Promise<string>
read: (() => Promise<string>)
- (): Promise<string>
Returns Promise<string>
subscribe: (() => Promise<void>)
- (): Promise<void>
Returns Promise<void>
unsubscribe: (() => Promise<void>)
- (): Promise<void>
Returns Promise<void>
write: ((data: string) => boolean)
- (data): boolean
Returns boolean
Provides file stream management functionalities. This function returns an object that offers various methods to manage a file stream, including opening, closing, reading, writing, flushing, subscribing, unsubscribing from the stream, getting the usage count of the stream, and checking if a stream is open.
Throws
Thrown if the environment is not a Node.js server.