Discuss (FTP) and (SFTP, FTPS and SCP), our Java file transfer clients.
no avatar
User

GeorgeT

Posts

6

Joined

Tue Apr 27, 2010 11:52 pm

ftp.dirDetails(".") shows the name of current dire

by GeorgeT » Wed Apr 28, 2010 2:13 am

Hello ,
Facts
I have an FTP client instance where
1. ftp.dirDetails(".") shows the name of current directory instead to list the content of it
2. ftp.dirDetails([current directory name]) also shows the name of current directory instead to list the files contained in the directory
3. ftp.dirDetails("") lists the content of the directory as I would also expected from ftp.dirDetails(".").
4 ftp.dir() lists the content of the directory as expected

==
Questions
1. ftp.dirDetails(".") behavior looks wrong to me , is that a bug or maybe I am missing something
2. ftp.dirDetails([current directory name]) - is this documented , should this have the same behavior with ftp.dirDetails(".") ?
3. ftp.dirDetails("") - is this documented , should this have the same behavior with ftp.dirDetails(".") ?

Our applications uses successful 1. and 2. which seams to work fine with many FTP servers .
We are just using the FTP client and not have any control of the FTP Server side .

Thank you in advance for any help , it is much appreciated
George
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: ftp.dirDetails(".") shows the name of current

by support2 » Wed Apr 28, 2010 7:37 am

It's really up to the FTP server what it returns from the various commands. You've found one that has somewhat unusual behaviour.
no avatar
User

GeorgeT

Posts

6

Joined

Tue Apr 27, 2010 11:52 pm

by GeorgeT » Thu Apr 29, 2010 12:44 am

Thank you for your reply .
I understand that the particular server has unusual behavior BUT why the Windows FTP client and Filezilla are able to return the list of files .
I use the commands DIR or LS from Windows command .
How do you explain your FTP client behaves different that other FTP clients when accessing the same FTP server ?

Thank you and best regards ,
george
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

by support2 » Thu Apr 29, 2010 3:24 am

The Windows FTP client and Filezilla are sending the equivalent of ftp.dirDetails("").

If they sent "." they'd have the same behaviour.

Who is online

Users browsing this forum: No registered users and 122 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign