Java FTP列表命令响应

Java FTP列表命令响应,java,ftp,ftp-server,Java,Ftp,Ftp Server,我正试图用Java编写一个FTP服务器,并将其基本功能关闭,但我无法找出或找到有关LIST命令的任何信息 LIST-a发送文件列表,如 drwxrwxrwx 1 stefan stefan 0 Jan 1 1970 personaluploads -rwxrwxrwx 1 stefan stefan 0 Jan 1 1970 serverflags.txt -rwxrwxrwx 1 stefan stefan 0 J

我正试图用Java编写一个FTP服务器,并将其基本功能关闭,但我无法找出或找到有关
LIST
命令的任何信息

LIST-a
发送文件列表,如

drwxrwxrwx 1 stefan stefan             0 Jan  1  1970 personaluploads
-rwxrwxrwx 1 stefan stefan             0 Jan  1  1970 serverflags.txt
-rwxrwxrwx 1 stefan stefan             0 Jan  1  1970 serveroptions.txt
-rwxrwxrwx 1 stefan stefan             0 Jan  1  1970 levels_npcserver.txt
通过数据连接

我应该只返回
列表
,返回什么?我是通过数据连接还是控制连接发送

谢谢你的帮助。

请参阅。它有你需要的所有信息

LIST (LIST) This command causes a list to be sent from the server to the passive DTP. If the pathname specifies a directory or other group of files, the server should transfer a list of files in the specified directory. If the pathname specifies a file then the server should send current information on the file. A null argument implies the user's current working or default directory. The data transfer is over the data connection in type ASCII or type EBCDIC. (The user must ensure that the TYPE is appropriately ASCII or EBCDIC). 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. 列表(列表) 此命令导致从服务器向服务器发送列表 被动DTP。如果路径名指定了目录或其他 组文件时,服务器应传输文件列表 在指定的目录中。如果路径名指定了 文件,则服务器应在 文件null参数表示用户当前的工作状态或 默认目录。数据传输是通过数据传输的 ASCII类型或EBCDIC类型的连接。(用户必须 确保类型为适当的ASCII或EBCDIC)。 因为文件上的信息可能因系统而异 对于系统来说,这些信息可能很难自动使用 在程序中,但对人类用户可能非常有用。