B-Arts DocumentationIndice generale

BFTPClient

Identità

  • Namespace: B.BNet

  • Assembly: BFramework

  • Tipo: class

  • Interfacce: IDisposable

  • Sorgente API: versione 5.0.0

Scopo

Client FTP/FTPS sincrono e asincrono per listing, trasferimento, eliminazione e dimensione dei file. Espone diagnostica tramite ExceptionList e LogText.

Dichiarazione

public class BFTPClient : IDisposable

Costruttori

  • BFTPClient()

  • BFTPClient(string host, int port, string username, string password, bool useSSL = false, bool useImplicitSSL = false, bool protectDataChannel = true, bool acceptAllCertificates = false, int timeout = 10000, Encoding? encoding = null)

Proprietà

Proprietà Tipo Accesso
AcceptAllCertificates bool get/set
ControlEncoding Encoding get/set
ExceptionList List<Exception> get/set
Host string get/set
IsConnected bool get
LogText BLogText get
Port int get/set
ProtectDataChannel bool get/set
Timeout int get/set
UseImplicitSSL bool get/set
UseSSL bool get/set

Metodi

  • bool Connect(string host, int port = 21)

  • Task<bool> ConnectAsync(string host, int port = 21)

  • bool DeleteFile(string remotePath)

  • Task<bool> DeleteFileAsync(string remotePath)

  • void Disconnect()

  • void Dispose()

  • BFile? DownloadFile(string remotePath)

  • bool DownloadFile(string remotePath, string localPath)

  • byte[]? DownloadFile(string remotePath, bool AsByte)

  • Task<BFile> DownloadFileAsBFileAsync(string remotePath)

  • Task<byte[]> DownloadFileAsync(string remotePath)

  • Task<bool> DownloadFileAsync(string remotePath, string localPath)

  • long GetFileSize(string remotePath)

  • Task<long> GetFileSizeAsync(string remotePath)

  • List<string>? ListDirectory(string path = "")

  • Task<List<string>> ListDirectoryAsync(string path = "")

  • bool Login(string username, string password)

  • Task<bool> LoginAsync(string username, string password)

  • List<BFtpItem>? ReadDirectory(string path = "")

  • Task<List<BFtpItem>> ReadDirectoryAsync(string path = "")

  • bool UploadFile(string localPath, string remotePath)

  • bool UploadFile(byte[] content, string remotePath)

  • bool UploadFile(BFile file, string remotePath)

  • Task<bool> UploadFileAsync(string localPath, string remotePath)

  • Task<bool> UploadFileAsync(byte[] content, string remotePath)

  • Task<bool> UploadFileAsync(BFile file, string remotePath)

Esempi

Consultare BFTPClient - Esempi.

Firme pubbliche estratte dal sorgente

B.BNet.BFTPClient
B.BNet.BFTPClient.BFTPClient()
B.BNet.BFTPClient.BFTPClient(string, int, string, string, bool, bool, bool, bool, int, System.Text.Encoding?)
B.BNet.BFTPClient.Host
B.BNet.BFTPClient.Port
B.BNet.BFTPClient.Timeout
B.BNet.BFTPClient.UseSSL
B.BNet.BFTPClient.UseImplicitSSL
B.BNet.BFTPClient.ProtectDataChannel
B.BNet.BFTPClient.AcceptAllCertificates
B.BNet.BFTPClient.ControlEncoding
B.BNet.BFTPClient.IsConnected
B.BNet.BFTPClient.ExceptionList
B.BNet.BFTPClient.LogText
B.BNet.BFTPClient.Connect(string, int)
B.BNet.BFTPClient.ConnectAsync(string, int)
B.BNet.BFTPClient.Login(string, string)
B.BNet.BFTPClient.LoginAsync(string, string)
B.BNet.BFTPClient.ListDirectory(string)
B.BNet.BFTPClient.ListDirectoryAsync(string)
B.BNet.BFTPClient.ReadDirectory(string)
B.BNet.BFTPClient.ReadDirectoryAsync(string)
B.BNet.BFTPClient.DownloadFile(string, string)
B.BNet.BFTPClient.DownloadFile(string, bool)
B.BNet.BFTPClient.DownloadFile(string)
B.BNet.BFTPClient.DownloadFileAsync(string, string)
B.BNet.BFTPClient.DownloadFileAsync(string)
B.BNet.BFTPClient.DownloadFileAsBFileAsync(string)
B.BNet.BFTPClient.UploadFile(string, string)
B.BNet.BFTPClient.UploadFile(byte[], string)
B.BNet.BFTPClient.UploadFile(B.BIO.BFile, string)
B.BNet.BFTPClient.UploadFileAsync(string, string)
B.BNet.BFTPClient.UploadFileAsync(byte[], string)
B.BNet.BFTPClient.UploadFileAsync(B.BIO.BFile, string)
B.BNet.BFTPClient.DeleteFile(string)
B.BNet.BFTPClient.DeleteFileAsync(string)
B.BNet.BFTPClient.GetFileSize(string)
B.BNet.BFTPClient.GetFileSizeAsync(string)
B.BNet.BFTPClient.Disconnect()
B.BNet.BFTPClient.Dispose()

<!-- BAIDocs:API:fine -->