CFtpServer::GetClientLocalPath Method  
 
INT GetClientLocalPath(
  UINT nClientId,  
  LPCTSTR lpszVirtualPath,  
  LPTSTR lpszLocalPath,  
  INT nMaxLength,  
);
INT GetClientLocalPath(
  UINT nClientId,  
  LPCTSTR lpszVirtualPath,  
  CString& strLocalPath  
);

Return the full local path for a virtual filename or directory on the server.

Parameters

nClientId
An unsigned integer which uniquely identifies the client session.
lpszVirtualPath
A pointer to a string that specifies an virtual path on the server. This parameter cannot be NULL.
lpszLocalPath
A pointer to a string buffer that will contain the full local path, terminated with a null-character. This buffer should be at least MAX_PATH characters to accommodate the complete path. This parameter cannot be NULL. An alternate version of this method accepts a CString object if it is available.
nMaxLength
An integer value that specifies the maximum number of characters that can be copied into the string buffer, including the terminating null character. This value must be greater than zero.

Return Value

If the method succeeds, the return value is the number of characters copied into the string buffer, not including the terminating null character. If the client ID does not specify a valid client session, the method will return zero. If the string buffer is not large enough to contain the complete path, this method will return zero and the last error code will be set to ST_ERROR_BUFFER_TOO_SMALL.

Remarks

The GetClientLocalPath method takes a virtual path and returns the full path to the specified file or directory on the local system. The virtual path may be absolute or relative to the current working directory for the client session. This method will recognize a tilde at the beginning of the path to specify the client home directory.

To obtain the virtual path for a local file or directory, use the GetClientVirtualPath method.

Requirements

Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: csftsv10.lib
Unicode: Implemented as Unicode and ANSI versions.

See Also

GetClientVirtualPath