FTP file system
This file system provides an implementation for the file system based on the FTP protocol using FluentFTP library.
var address = "address";var username ="username";var password ="password";
using var fileSystem = TagBites.IO.Ftp.FtpFileSystem.Create(address, username, password);// ... using like standard file systemRemember to use
usingstatement or callDisposemethod after usage.
By default, connections use explicit FTPS (FtpEncryptionMode.Explicit) with 3 retry attempts and auto-passive data connections. For full control over the connection (encryption mode, retry attempts, custom port, proxy, etc.), pass a FtpConnectionConfig - which extends FluentFTP’s FtpConfig - instead:
var connectionConfig = new FtpConnectionConfig(address, username, password){ EncryptionMode = FtpEncryptionMode.None, RetryAttempts = 5};
using var fileSystem = TagBites.IO.Ftp.FtpFileSystem.Create(connectionConfig);// ... using like standard file systemCapabilities
Section titled “Capabilities”- Synchronous and asynchronous operations.
- Reports permissions from the server, so
CanReadandCanWritereflect the remote account. - Metadata: last write time only. Hidden and read-only flags are not exposed by FTP.
- TLS is on by default, but the server certificate is not verified - see security policy.
Full implementation on github: TagBites.IO.Ftp.