[英]Differences between ListDirectory and ListDirectoryDetails FTP methods in C#
I want to list the files in FT Pserver.我想列出 FT Pserver 中的文件。
I use ListDirectory
and ListDirectoryDetails
FTP methods for listing the files.我使用
ListDirectory
和ListDirectoryDetails
FTP 方法来列出文件。
That get the files list, but the count of files in ListDirectory
is less than ListDirectoryDetails
method, but I don't know why?那个获取文件列表,但是
ListDirectory
的文件数少于ListDirectoryDetails
方法,但不知道为什么?
Is it possible???是否可以???
The ListDirectory
method uses FTP NLST
command. ListDirectory
方法使用 FTP NLST
命令。
The ListDirectoryDetails
method uses FTP LIST
command. ListDirectoryDetails
方法使用 FTP LIST
命令。
It's up to the FTP server, what it returns in a response to each of the commands.这取决于 FTP 服务器,它在对每个命令的响应中返回什么。 The .NET framework does not control it anyhow.
.NET 框架无论如何都无法控制它。
The RFC 959 says only this: RFC 959仅说明了这一点:
LIST
: LIST
:
The RFC says nothing about what the list should contains, just that: RFC 没有说明列表应该包含什么,只是:
Since the information on a file may vary widely from system to system, this information may be hard to use automatically in a program, but may be quite useful to a human user.
由于文件上的信息可能因系统而异,因此该信息可能难以在程序中自动使用,但对人类用户可能非常有用。
NLST
: NLST
:
The server will return a stream of names of files and no other information.
服务器将返回文件名称流,不返回其他信息。
We do not know what you FTP server is, so we cannot give you more details.我们不知道你的 FTP 服务器是什么,所以我们不能给你更多的细节。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.