FileTransfer.GetFirstFile Method (String, Int64, Boolean)
Get information about the first file in a directory listing returned by the server.
[Visual Basic]
Overloads Public Function GetFirstFile( _
ByRef fileName As String, _
ByRef fileSize As Long, _
ByRef isDirectory As Boolean _
) As Boolean
[C#]
public bool GetFirstFile(
ref string fileName,
ref long fileSize,
ref bool isDirectory
);
Parameters
- fileName
- A string passed by reference which will contain a file name when the method returns.
- fileSize
- An integer passed by reference which will contain the size of the file when the method returns.
- isDirectory
- A boolean passed by reference which will specify if the file is a regular file or a directory. A value of
true indicates that the file is a directory. A value of false indicates that it is a
regular file.
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
A file listing is initiated by calling the OpenDirectory method. Then, the application must call
GetFirstFile, followed by calling GetNextFile in a loop until the method returns
false. Once the complete directory listing has been returned, the CloseDirectory method
must be called.
See Also