Catalyst File Transfer .NET

FileTransfer.GetFileStatus Method 

[Visual Basic]
Public Function GetFileStatus( _
   ByVal remoteFile As String, _
   ByRef fileInfo As FileInformation _
) As Boolean
[C#]
public bool GetFileStatus(
   string remoteFile,
   ref FileInformation fileInfo
);

Parameters

remoteFile
A string which specifies the name of the file that status information is to be returned for.
fileInfo
A FileInformation structure that is passed by reference. When the method returns, the members of this structure will be populated with information about the file on the server.

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

The GetFileStatus method returns information about the specified file. The filename must be specified using the remote host file naming conventions, and cannot include wildcard characters. The primary difference between using this method and using the OpenDirectory, GetFirstFile and GetNextFile methods to obtain file information is that the file status information is returned on the command channel. This method cannot be used while a file transfer is in progress or while a file listing is being returned by the server.

This method requires that the server return file status information in response to the STAT command. Some servers, for example on VMS platforms, do not provide this information. On some systems, the STAT command will not return information on files that contain spaces or tabs in the filename. In this case, the method will return an empty structure.

See Also

FileTransfer Class | SocketTools Namespace