Destination filesystem path; opened for writing (truncating any existing file).
Internal; when true, path is treated as a directory and the
final file name is derived from the (sanitized) transfer metadata at open() time.
Prefer NodeFileSink.intoDirectory.
Close the handle and delete the partially written file (ignoring unlink errors).
Close the file handle.
A SinkResult whose path is the destination file path.
Open the destination file for writing, truncating any existing contents. In directory mode the final path is resolved here from the (sanitized) metadata name.
File metadata; its name is used (sanitized) only in directory mode.
Write a chunk at an absolute file offset, opening the file first if needed.
Byte offset at which to write.
The chunk bytes.
StaticintoCreate a sink that writes into dir, deriving the file name from the transfer
metadata with sanitizeFileName applied automatically. This neutralizes
path-traversal / absolute names (../../etc/passwd, C:\evil) from a hostile
peer by default, so the written file can never escape dir.
Destination directory the received file is written into.
StorageSink that writes received bytes directly to a file on the Node filesystem.
Chunks are written at absolute offsets through an
fs.promisesfile handle, so files never need to be buffered in memory. Node-only; import fromrtcforge-sdk/filetransfer/node.