SocketTools .NET Edition

FtpClient.AddFileType Method 

Associate a file name extension with a specific file type.

[Visual Basic]
Public Function AddFileType( _
   ByVal fileExtension As String, _
   ByVal fileType As FtpFileType _
) As Boolean
[C#]
public bool AddFileType(
   string fileExtension,
   FtpFileType fileType
);

Parameters

fileExtension
A string value which specifies the file name extension.
fileType
A FtpFileType enumeration which specifies the type of file associated with the file extension.

Return Value

This method returns a boolean value. If the method succeeds, the return value is true. If the method fails, the return value is false. To get extended error information, check the value of the LastError property.

Remarks

This method is used to associate specific file types with file name extensions. The class has an internal list of standard text file extensions which it automatically recognizes. This method can be used to extend or modify that list for the client session.

See Also

FtpClient Class | SocketTools Namespace | FtpFileType Enumeration