Ftp.GetNameList Method
Namespace: Rebex.Net
Assembly: Rebex.Ftp.dll (version 7.0.9119)
GetNameList(String)
Retrieves the list of names.
Declaration
public string[] GetNameList(string arguments)
Parameters
Type | Name | Description |
---|---|---|
String | arguments | Arguments for the NLST command. |
Returns
Type | Description |
---|---|
String[] | An array of names. |
Implements
Remarks
Represents FTP NLST command.
Actual behavior of NLST command varies from server to server, because the RFC is not clear in explaining what it should do. Some servers return the names of both files and directories, others return files only or even report error if the current directory is empty. Using GetList is a better choice in most cases.
Caution: The meaning of the arguments argument is not defined by RFC and varies from server to server. Some servers interpret it as parameters to ls command, some as a filename, some ignore it and some report an error. Calling this method with arguments other than null is not recommended and will make your code incompatible with many FTP servers.
GetNameList()
Retrieves the list of names in the current server directory.
Declaration
public string[] GetNameList()
Returns
Type | Description |
---|---|
String[] | An array of names. |
Implements
Remarks
Represents FTP NLST command.
Actual behaviour of NLST command varies from server to server, because the RFC is not clear in explaining what it should do. Some servers return the names of both files and directories, others return files only or even report error if the current directory is empty. Using GetList is a better choice in most cases.