I’m writing an embedded ftp server, and I cannot get the listing format correctly. The server works completely, only programs like FileZilla cannot interpret the listing format. Here’s a sample listing:
-rwxr--r-- 1 owner group 640 1970 01 01 test
-rwxr--r-- 1 owner group 13440 1970 01 01 test.html
-rwxr--r-- 1 owner group 512 1970 01 01 test2.txt
Which is basically:
permissions[tab]number?[tab]owner[tab]group[tab]filesize[tab]date[tab]filename
What am I doing wrong?
Thanks,
Yvan
As others have already mentioned, you need to use spaces instead of tabs. Here’s a sprintf from another embedded FTP server that should work:
permstris set to a string like"-rw-rw-rw-".As for date formats, these two should work, with the top used if the date is more than 6 months old: