Open an existing file or create a new file on the server.
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.
The OpenFile method opens an existing file or creates a new file on the remote server using the specified file name. The Read method may then be used to read data from the file and the Write method may be used to write data to the file. Once the all of the data has been read or written, the CloseFile method must be called to close the data channel.
It is strongly recommended that most applications use the GetFile or PutFile methods to perform file transfers. These methods are easier to use, and have internal optimizations that improves the overall data transfer rate when compared to implementing the file transfer code in your own application.
When a file is created on the remote server, the file ownership and access rights are determined by the server. Some servers may provide a method to change these attributes through site-specific commands. Refer to the server's operating system documentation for more information about what commands may be available.
FtpClient Class | SocketTools Namespace | FtpClient.OpenFile Overload List