NET FTP Library
GetRawDirectoryListing(String) Method
Example 






KellermanSoftware.NetFtpLibrary Namespace > FTP Class > GetRawDirectoryListing Method : GetRawDirectoryListing(String) Method
Returns the raw directory listing of the current FTP folder via the passed in command. Examples: LIST, LIST -R, MLSD etc.
Syntax
'Declaration
 
Public Overloads Function GetRawDirectoryListing( _
   ByVal listCommand As System.String _
) As System.String
'Usage
 
Dim instance As FTP
Dim listCommand As System.String
Dim value As System.String
 
value = instance.GetRawDirectoryListing(listCommand)
public System.string GetRawDirectoryListing( 
   System.string listCommand
)
public function GetRawDirectoryListing( 
    listCommand: System.String
): System.String; 
public function GetRawDirectoryListing( 
   listCommand : System.String
) : System.String;
public: System.string* GetRawDirectoryListing( 
   System.string* listCommand
) 
public:
System.String^ GetRawDirectoryListing( 
   System.String^ listCommand
) 

Parameters

listCommand

Return Value

String representing a directory listing
Example
FTP ftp = new FTP(); //Trial Mode            
//FTP ftp = new FTP("place user name here", "place license key here");
 
// set the name of the FTP server( its URL )
ftp.HostAddress = "ftp.fsz.bme.hu"; // a hungarian university. change this to your ftp server
ftp.UserName = "anonymous"; // replace with your user name
ftp.Password = "user@mail.com"; // replace with your password
 
//Return a raw list of the files and dirs in the current ftp directory 
string raw = ftp.GetRawDirectoryListing("LIST");
 
System.Console.WriteLine(raw);
Dim ftp As FTP = New FTP() 'Trial Mode
'FTP ftp = new FTP("place user name here", "place license key here");
 
' set the name of the FTP server( its URL )
ftp.HostAddress = "ftp.fsz.bme.hu" ' a hungarian university. change this to your ftp server
ftp.UserName = "anonymous" ' replace with your user name
ftp.Password = "user@mail.com" ' replace with your password
 
'Return a raw list of the files and dirs in the current ftp directory
Dim raw As String = ftp.GetRawDirectoryListing("LIST")
 
System.Console.WriteLine(raw)
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

FTP Class
FTP Members
Overload List