MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / cleanupFileStream

Function cleanupFileStream

lib/ldp-copy.mjs:18–22  ·  view source on GitHub ↗

* Cleans up a file write stream (ends stream, deletes the file). * @method cleanupFileStream * @private * @param stream {WriteStream}

(stream)

Source from the content-addressed store, hash-verified

16 * @param stream {WriteStream}
17 */
18function cleanupFileStream (stream) {
19 const streamPath = stream.path
20 stream.destroy()
21 fs.unlinkSync(streamPath)
22}
23
24/**
25 * Performs an LDP Copy operation, imports a remote resource to a local path.

Callers 1

copyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected