ZennoLab Assemblies Documentation
FtpGetList Method
See Also  Example Send Feedback
ZennoLab.CommandCenter Assembly > ZennoLab.CommandCenter Namespace > ZennoPoster Class : FtpGetList Method
host

Type: System.String

The address of the FTP server.
port

Type: System.Int32

The port of the FTP server.

protocol

Type: System.String

The FTP protocol. It can be "FTP", "sFTP", or "FTPs".

login

Type: System.String

The login of the FTP server.

pass

Type: System.String

The password of the FTP server.

proxy

Type: System.String

The proxy string in format: login:pass@ip:port OR ip:port.

directoryName

Type: System.String

The directory name.

recursive

Type: http://msdn.microsoft.com/en-us/library/system.boolean.aspx%

The true if use recursion; otherwise, false.

includeDirectory

Type: http://msdn.microsoft.com/en-us/library/system.boolean.aspx%

The true if use subdirectories; otherwise, false.

Glossary Item Box

Returns all files in the directory.

Syntax

C# 
public static IEnumerable<string> FtpGetList( 
   string host,
   int port,
   string protocol,
   string login,
   string pass,
   string proxy,
   string directoryName,
   bool recursive,
   bool includeDirectory
)

Parameters

host

Type: System.String

The address of the FTP server.
port

Type: System.Int32

The port of the FTP server.

protocol

Type: System.String

The FTP protocol. It can be "FTP", "sFTP", or "FTPs".

login

Type: System.String

The login of the FTP server.

pass

Type: System.String

The password of the FTP server.

proxy

Type: System.String

The proxy string in format: login:pass@ip:port OR ip:port.

directoryName

Type: System.String

The directory name.

recursive

Type: http://msdn.microsoft.com/en-us/library/system.boolean.aspx%

The true if use recursion; otherwise, false.

includeDirectory

Type: http://msdn.microsoft.com/en-us/library/system.boolean.aspx%

The true if use subdirectories; otherwise, false.

Return Value

Type: IEnumerable<string>

The list of all files and directories represented by collection of the IEnumerable interface.

Example

The following example shows call the FtpGetList method.
C#Copy Code
var list = new System.Collections.Generic.List<string>(ZennoPoster.FtpGetList({host}, {port}, {protocol}, {login}, {password}, {proxy}, "", false, false));
PHPCopy Code
$list = new System::Collections::Generic::List<string>(ZennoLab\CommandCenter\ZennoPoster::FtpGetList({host}, {port}, {protocol}, {login}, {password}, {proxy}, "", false, false));

Requirements

Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.