Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
7.1k views
in General by
Hi,

I have a problem with the dir() method of the FTPClient class.
I have made some tests on further FTP server, and with one of them the dir method only return the files names, and not the directories name.
Is it normalous ? how i can have the directories name, with a another method ?

thanks and this class is very useful !

4 Answers

0 votes
by
could try dir(".", true)

some FTP servers don't implement RFC959 correctly unfortunately


Hi,

I have a problem with the dir() method of the FTPClient class.
I have made some tests on further FTP server, and with one of them the dir method only return the files names, and not the directories name.
Is it normalous ? how i can have the directories name, with a another method ?

thanks and this class is very useful !
0 votes
by
with dir(".", true) it works, but it gives me that :

total 0
drw-rw-rw-   1 user     group           0 Mar 21 21:30 .
drw-rw-rw-   1 user     group           0 Mar 21 21:30 ..
drw-rw-rw-   1 user     group           0 Mar 21 21:35 parutions


but when i put the parameter detailed listing at false, to get only the directories name, it returns nothing !
When i execute dir(".", true) on another server it returns all the files and the directories, i was thinking that il will return only the directory name
0 votes
by
Unfortunately there isn't a standard of how the listing is returned, it will depend on the FTP server.

with dir(".", true) it works, but it gives me that :

total 0
drw-rw-rw-   1 user     group           0 Mar 21 21:30 .
drw-rw-rw-   1 user     group           0 Mar 21 21:30 ..
drw-rw-rw-   1 user     group           0 Mar 21 21:35 parutions


but when i put the parameter detailed listing at false, to get only the directories name, it returns nothing !
When i execute dir(".", true) on another server it returns all the files and the directories, i was thinking that il will return only the directory name
0 votes
by
Ok, thanks you for your help !

Categories

...