Closes a file stream and removes it from the singleton manager.
Ensures that the file stream is properly closed, releasing any resources
associated with it and preventing memory leaks or resource exhaustion.
Throws
Thrown if the environment is not a Node.js server.
Throws
Thrown if the file stream to close is not found.
Throws
Thrown if any unexpected error occurs during the closing process.
closeFileStream(filePath): Promise<void>
Parameters
filePath: string
The path to the file whose stream should be closed.
Closes a file stream and removes it from the singleton manager. Ensures that the file stream is properly closed, releasing any resources associated with it and preventing memory leaks or resource exhaustion.
Throws
Thrown if the environment is not a Node.js server.
Throws
Thrown if the file stream to close is not found.
Throws
Thrown if any unexpected error occurs during the closing process.