FTP

Frends.FTP.ReadFile / 1.0.0

Summary

Fetches one file's content from an FTP or FTPS server into the Process, decoding it as text, without writing to disk.

Typical use — small control or manifest files whose content decides what a Process does next

Details

Frends version
5.1 and newer
Agents
Crossplatform, Legacy
Target frameworks
net6.0, netstandard2.0

Parameters class usually contains parameters that are required.

Name Type Default Example Description
Address String my.ftp.server.com

FTP(S) host address

Port Int32 21 21

Port number to use in the connection to the server.

UserName String myUsername

Username to use for authentication to the server. Note that the file endpoint only supports username for remote shares and the username must be in the format DOMAIN\Username.

PasswordSecret String myPassword

Password to use in the authentication to the server.

TransportType FtpTransportType Binary FtpTransportType.Binary

Type of transfer: 'Ascii' sends files as text and must only be used for sending ASCII text files. 'Binary' (default) sends files as raw data and should be used for sending e.g. UTF-encoded text files

Possible values:

  • Binary: Binary transport.

  • Ascii: ASCII transport.

Mode FtpMode Passive FtpMode.Passive

Connection mode to use to connect to the FTP server

Possible values:

  • Passive: Passive mode

  • Active: Active mode.

KeepConnectionAliveInterval Int32 0 60

Sends NOOP command to keep connection alive at specified time-interval in seconds. If set to 0 the connection is not kept alive. Default value is 0

ConnectionTimeout Int32 60 60

The length of time, in seconds, until the connection times out. You can use value 0 to indicate that the connection does not time out. Default value is 60 seconds

Encoding String utf-8

If set, this encoding will be used to encode and decode command parameters and server responses, such as file names. Example values: utf-8, utf-16, windows-1252

BufferSize Int32 4096 4096

Integer value of used buffer size as bytes. Default value is 4 KB.

UseFTPS Boolean False false

Whether to use FTPS or not.

SecureDataChannel Boolean True true

Whether the data channel is secured or not.

SslMode FtpsSslMode None FtpsSslMode.None

Specifies whether to use Explicit or Implicit SSL

Possible values:

  • None: No encryption (plain text).

  • Explicit: Use explicit encryption.

  • Implicit: Use implicit encryption.

  • Auto: Tries to use FTPS encryption and falls back to plain text FTP.

EnableClientAuth Boolean False false

If enabled the client certificate is searched from user's certificate store

ValidateAnyCertificate Boolean False false

If enabled the any certificate will be considered valid.

ClientCertificatePath String c:\example.cer

Path to client certificate (X509).

CertificateHashStringSHA1 String D911262984DE9CC32A3518A1094CD24249EA5C49

Certificate SHA1 hash string to validate against.

An unhandled error has occurred. Reload 🗙