ReadonlymimeMIME type advertised to the receiver; defaults to application/octet-stream.
ReadonlynameFile name advertised to the receiver; defaults to the path's basename.
ReadonlysizeTotal file size in bytes, determined by stat at creation.
Close the open file handle, if any.
Read up to length bytes from offset, opening the file for reading on
first use.
Byte offset at which to start reading.
Maximum number of bytes to read; the result is truncated to the bytes actually read at end-of-file.
The bytes read.
StaticcreateCreate a source for a file on disk, reading its size via stat.
Path to the file to send.
Optional overrides: name (advertised file name, defaults to the basename) and mimeType (defaults to application/octet-stream).
A ready-to-use NodeFileSource.
FileSource that reads the outbound file from the Node filesystem.
Ranges are read on demand through an
fs.promisesfile handle, so large files are streamed rather than loaded into memory. Construct instances with the async NodeFileSource.create factory (which stats the file for its size). Node-only; import fromrtcforge-sdk/filetransfer/node.