How to know what kind of directory listing style the FTP server is using?
I have to create my own FTP client. I found there are two kinds of directory listing styles a FTP server might use, UNIX and MS-DOS.
Is there a way that I can send an message to FTP server, to ask what 开发者_开发问答kind of directory it is using?
Simply use Filezilla to connect to an Unix server. you will see server responses as below example.
Response: IDLE
Response: MDTM
Response: SIZE
Response: REST STREAM
Response: MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
Response: MLSD
Response: AUTH TLS
Response: PBSZ
Response: PROT
Response: ESTA
Response: PASV
Response: EPSV
Response: SPSV
Response: ESTP
Note the text UNIX.mode. It says server lists file in Unix mode. You can test the same with a Windows server too.
精彩评论