réponses de commande FTP LIST
-
12-10-2019 - |
Question
Je suis en train d'écrire un serveur FTP en Java et ont le bas de fonctionnalités de base, mais je ne peux pas comprendre ou de trouver des informations sur la commande LIST
.
LIST -a
envoie une liste de fichiers comme
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
sur la connexion de données.
Que dois-je retourner avec juste LIST
? Est-ce que je l'envoie sur la connexion de données ou la connexion de contrôle?
Merci pour l'aide.
La solution
Voir RFC 959 - File Transfer Protocol
. Il a toutes les informations dont vous avez besoin.
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.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow