Xceed .NET Libraries Documentation
GetFolderContents() Method


Xceed.Ftp Assembly > Xceed.Ftp Namespace > FtpClient Class > GetFolderContents Method : GetFolderContents() Method
Retrieves the entire contents of the current working folder.
Syntax
'Declaration
 
Public Overloads Function GetFolderContents() As FtpItemInfoList
'Usage
 
Dim instance As FtpClient

Dim value As FtpItemInfoList

 

value = instance.GetFolderContents()
public FtpItemInfoList GetFolderContents()

Return Value

A reference to an FtpItemInfoList collection containing FtpItemInfo objects each representing a file matched by remoteFileMask.
Exceptions
ExceptionDescription
Cannot perform the requested operation because the FTP client is in an invalid state.
An error reply was returned by the FTP server.
An I/O error has occurred.
A fatal FTP-specific error has occurred..
Remarks

If you want to retrieve the contents of another folder, you could use the ChangeCurrentFolder and/or ChangeToParentFolder methods to change the current working folder.

The current working folder can be retrieved via the GetCurrentFolder method.

The listing lines can be manually parsed or modified via the ParsingListingLine event.

If you would prefer to receive an unprocessed list of items, you can use the GetRawFolderContents method instead.

The TYPE command will be sent regardless of the value of the SendTypeCommand property when calling the GetFolderContents method.

The GetFolderContents method will send the LIST and PASV or PORT and TYPE commands to the FTP server.

This method is the equivalent of the GetFolderContents and ListFolderContents methods of the ActiveX version of the Xceed FTP Library.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FtpClient Class
FtpClient Members
Overload List
Xceed.Ftp.FtpClient.GetRawFolderContents(Xceed.Ftp.Engine.FtpCommandChannel,Xceed.Ftp.Engine.ListFtpCommand)
ParsingListingLine Event