Changes a path's permission bits.
Closes the SFTP channel (and the session if this opened it).
Streams a file's contents.
Streams writes into a file (created/truncated, or appended at offset to resume).
Optionalopts: SftpWriteOptionsCreates a directory and every missing parent, like mkdir -p. SFTP MKDIR is single-level,
so this issues one MKDIR per path segment and tolerates segments that already exist.
Reports whether a path exists by attempting to stat it: a "no such file" status
resolves false, success resolves true, and any other error propagates.
Creates a directory.
Reads an entire file into memory.
Reads a file, decodes it as UTF-8, and parses it as JSON.
Reads a file and decodes it as UTF-8 text.
Resolves a path to its canonical absolute form.
Removes a file.
Recursively removes a directory and all of its contents (non-atomic).
Optionalopts: { ignoreMissing?: boolean }Removes several files.
Optionalopts: { ignoreMissing?: boolean }Renames a file or directory.
Removes an empty directory.
Writes a file. With no offset the file is created/truncated; with offset the data
is written at that byte position without truncating - the basis for resuming an
interrupted upload (stat the partial file, then write the remainder at its size).
Optionalopts: SftpWriteOptionsSerializes a value as JSON and writes it to a file.
Optionalopts: { space?: number }Encodes text as UTF-8 and writes it to a file.
Optionalopts: SftpWriteOptions
A stateful SFTP session.