Ftp
public class Ftp
Implements file transfer functionality using MAVLink FTP.
-
Initializes a new
Ftpplugin.Normally never created manually, but used from the
Dronehelper class instead.Declaration
Swift
public convenience init(address: String = "localhost", port: Int32 = 50051, scheduler: SchedulerType = ConcurrentDispatchQueueScheduler(qos: .background))Parameters
addressThe address of the
MavsdkServerinstance to connect toportThe port of the
MavsdkServerinstance to connect toschedulerThe scheduler to be used by
Observables -
Undocumented
See moreDeclaration
Swift
public struct RuntimeFtpError : Error -
Undocumented
See moreDeclaration
Swift
public struct FtpError : Error -
Progress data type for file transfer.
See moreDeclaration
Swift
public struct ProgressData : Equatable -
Result type.
See moreDeclaration
Swift
public struct FtpResult : Equatable -
Resets FTP server in case there are stale open sessions.
Declaration
Swift
public func reset() -> Completable -
Downloads a file to local directory.
Declaration
Swift
public func download(remoteFilePath: String, localDir: String) -> Observable<ProgressData> -
Uploads local file to remote directory.
Declaration
Swift
public func upload(localFilePath: String, remoteDir: String) -> Observable<ProgressData> -
Lists items from a remote directory.
Declaration
Swift
public func listDirectory(remoteDir: String) -> Single<[String]>Parameters
remoteDirThe remote directory to list the contents for.
-
Creates a remote directory.
Declaration
Swift
public func createDirectory(remoteDir: String) -> CompletableParameters
remoteDirThe remote directory to create.
-
Removes a remote directory.
Declaration
Swift
public func removeDirectory(remoteDir: String) -> CompletableParameters
remoteDirThe remote directory to remove.
-
Removes a remote file.
Declaration
Swift
public func removeFile(remoteFilePath: String) -> CompletableParameters
remoteFilePathThe path of the remote file to remove.
-
Renames a remote file or remote directory.
Declaration
Swift
public func rename(remoteFromPath: String, remoteToPath: String) -> CompletableParameters
remoteFromPathThe remote source path.
remoteToPathThe remote destination path.
-
Compares a local file to a remote file using a CRC32 checksum.
Declaration
Swift
public func areFilesIdentical(localFilePath: String, remoteFilePath: String) -> Single<Bool>Parameters
localFilePathThe path of the local file.
remoteFilePathThe path of the remote file.
-
Set root directory for MAVLink FTP server.
Declaration
Swift
public func setRootDirectory(rootDir: String) -> CompletableParameters
rootDirThe root directory to set.
-
Set target component ID. By default it is the autopilot.
Declaration
Swift
public func setTargetCompid(compid: UInt32) -> CompletableParameters
compidThe component ID to set.
-
Get our own component ID.
Declaration
Swift
public func getOurCompid() -> Single<UInt32>
View on GitHub
Install in Dash
Ftp Class Reference