Skip to content

Server Information

Robin Rodricks edited this page Jun 14, 2023 · 20 revisions

API

Tip: For detailed documentation refer to the IntelliSense tips that appear when you call a given API method.

  • ServerType - Gets the type of the FTP server software that we're connected to, using the FtpServer enum. See the list of supported FTP servers. Default: FtpServer.Unknown

  • ServerOS - Gets the operating system of the FTP server software that we're connected to, using the FtpOS enum. See the list of supported operating systems. Default: FtpOS.Unknown

  • SystemType - Gets the type of system/server that we're connected to.

  • Capabilities - Gets the server capabilities (represented by flags).

  • HasFeature() - Checks if a specific feature (FtpCapability) is supported by the server.

FAQs

How do I detect the type of server I'm connecting to?

You can read ServerType to get the exact type of FTP server software that you've connected to. We dynamically detect the FTP server software based on the welcome message it sends when you've just connected to it. We can currently detect all the servers in this list.

You can also read ServerOS to get the operating system of the FTP server you've connected to. We can detect:

  • Windows
  • Unix
  • VMS
  • IBM OS/400
  • IBM z/OS
  • SunOS

What kinds of server-specific commands are supported?

FluentFTP has a flexible server system. Each server type internally implements FtpBaseServer and provides all the server-specific functionality to fine-tune FluentFTP for that type of server.

We have already implemented server-specific functionality for all of the server types given above, but if you feel some functionality is missing or lacking, feel free to modify the server's file in the FluentFTP.Servers namespace (folder) and submit a pull request.

Server-specific functionality supported:

  1. Directory listing parser to be used for that server. This enables FtpParser.Auto to work correctly.

  2. Recursive file listings (LIST -R) on server-side.

  3. Recursively creating a new directory by creating all the path segments leading up to the directory.

  4. Recursively deleting a directory and all its contents.

  5. Determining if a path is an absolute path or relative path, in order to generate FTP paths correctly.

How is Azure FTP detected?

Azure is difficult to detect because it does not identify itself in the welcome message, something that is customary and followed by all other server types. Azure is indistinguishable from Windows/IIS FTP servers.

Therefore we are forced to use the domain name as a hint that the server is hosted on Azure.

All Azure FTP services will have this in the domain name: azurewebsites.windows.net, and so we use this to detect if the FTP server is running on Azure or not.

Azure FTP services are notorious for being slow, and therefore we have to increase our internal timeouts and auto-retry file transfer operations. All this configuration is done automatically by ConnectModule.

Clone this wiki locally