Required Instance Methodorlandos-nl.citadel 0.8.0Citadel
removeFile(_:context:)
Removes the file at the given path. This is equivalent to the unlink()
system call.
func removeFile(_ filePath: String, context: SSHContext) async throws -> SFTPStatusCode
Other requirements
Instance members
func addSymlink(linkPath: String, targetPath: String, context: SSHContext
) async throws -> SFTPStatusCode Creates a symbolic link at the given path with the given target. This is equivalent to the
symlink()
system call.func createDirectory(String, withAttributes: SFTPFileAttributes, context: SSHContext
) async throws -> SFTPStatusCode Creates a directory at the given path with the given attributes. This is equivalent to the
mkdir()
system call.func fileAttributes(atPath: String, context: SSHContext
) async throws -> SFTPFileAttributes Returns the attributes for the file at the given path. This is equivalent to the
stat()
system call.func openDirectory(atPath: String, context: SSHContext
) async throws -> SFTPDirectoryHandle Opens a directory at the given path. This is equivalent to the
opendir()
system call. Returns a handle to the directory that can be used to list the files in the directory.func openFile(String, withAttributes: SFTPFileAttributes, flags: SFTPOpenFileFlags, context: SSHContext
) async throws -> SFTPFileHandle Opens a file at the given path with the given attributes and flags. This is equivalent to the
open()
system call.func readSymlink(atPath: String, context: SSHContext
) async throws -> [SFTPPathComponent] Reads the target of the symbolic link at the given path. This is equivalent to the
readlink()
system call.func realPath(for: String, context: SSHContext
) async throws -> [SFTPPathComponent] Resolves the given path to a canonical path. This is equivalent to the
realpath()
system call.func removeDirectory(String, context: SSHContext
) async throws -> SFTPStatusCode Removes the directory at the given path. This is equivalent to the
rmdir()
system call.func rename(oldPath: String, newPath: String, flags: UInt32, context: SSHContext
) async throws -> SFTPStatusCode Renames a file
func setFileAttributes(to: SFTPFileAttributes, atPath: String, context: SSHContext
) async throws -> SFTPStatusCode Sets the file attributes for the file at the given path. This is equivalent to the
chmod()
system call.