An integer value which specifies the number of characters copied
into the buffer, not including the terminating null character. If the
method fails, the return value will be zero and the
GetLastError method can be used to retrieve the last error
code. If the last error code is returned as a value of zero, this
means that the command issued by the client accepts a file name as an
argument, but the client did not specify one.
The GetCommandFile method is used to obtain the full
path to a local file name or directory specified by the client as an
argument to a standard FTP command. For example, if the client sends
the RETR command to the server, this method will return the complete
path to the local file that the client wants to download. This method will
only work with those standard commands that perform some action on a
file or directory.
This method should always be used to obtain the file name for a
command that performs a file or directory operation. The
GetCommandParam method will return the actual command
parameter, but the file name will typically be relative to the user
home directory or server root directory, and cannot be passed
directly to a Windows API function. The GetCommandFile
method normalizes the path provided by the client and ensures that
it specifies a file or directory name in the correct location.
To change the file or directory name that is the target of the
current command, use the SetCommandFile method.