Xceed .NET Libraries Documentation
GetRawFolderContents(Boolean) Method


Xceed.Ftp Assembly > Xceed.Ftp Namespace > FtpClient Class > GetRawFolderContents Method : GetRawFolderContents(Boolean) Method
true if only filenames should be retrieved; false otherwise.
Retrieves an unprocessed, clear text list representing the entire contents of current working folder as sent by the FTP server and indicates if the entire listing or only filenames should be retrieved.
Syntax
'Declaration
 
Public Overloads Function GetRawFolderContents( _
   ByVal namesOnly As Boolean _
) As StringList
'Usage
 
Dim instance As FtpClient
Dim namesOnly As Boolean
Dim value As StringList
 
value = instance.GetRawFolderContents(namesOnly)
public StringList GetRawFolderContents( 
   bool namesOnly
)

Parameters

namesOnly
true if only filenames should be retrieved; false otherwise.

Return Value

A reference to a StringList collection contain a list of unprocessed strings each representing an item folder. For example: "07-25-03 11:46AM 101 001fdf63.xml". Of course, the format of the strings returned by the FTP server can vary from server to server.
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 namesOnly is set to true, the NLST command will be sent to the FTP server and only the name of the items will be returned.If namesOnly is set to false, the LIST command will be sent to the FTP server and all the available information will be returned.

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

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

If you would prefer to receive a processed list of items, you can use the GetFolderContents method instead.

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

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

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.GetFolderContents(Xceed.Ftp.Engine.FtpCommandChannel,Xceed.Ftp.Engine.ListFtpCommand)