sftpRm()
Removes (unlinks) a file from the remote server using SFTP.Signature
Parameters
string
required
The path of the file to remove on the remote server.
CallbackFunction<void>
Optional callback function to handle the result or error.
Returns
Promise<void>
A promise that resolves when the file is successfully removed, or rejects with an error if the operation fails.
Example
sftpRename()
Renames a file or directory on the remote server using SFTP.Signature
Parameters
string
required
The current path of the file or directory on the remote server.
string
required
The new path to rename the file or directory to.
CallbackFunction<void>
Optional callback function to handle the result or error.
Returns
Promise<void>
A promise that resolves when the file or directory is successfully renamed, or rejects with an error if the operation fails.
Example
sftpChmod()
Changes the permissions of a file or directory on the remote server using SFTP.Signature
Parameters
string
required
The path of the file or directory on the remote server.
number
required
The new permissions to set in octal format (e.g.,
0o755 or 493).Common permission values:0o755(493): Read, write, execute for owner; read and execute for group and others0o644(420): Read and write for owner; read-only for group and others0o600(384): Read and write for owner only
CallbackFunction<void>
Optional callback function to handle the result or error.
Returns
Promise<void>
A promise that resolves when the permissions are successfully changed, or rejects with an error if the operation fails.
Example
Platform Notes
- Android: Fully supported
- iOS: Not supported