Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5.9k views
in Java FTP by (580 points)
could you please tell me a way that i could avoid all hidden files getting listed in dirdetails or dir methods

10 Answers

0 votes
by (162k points)
Probably the easiest way is to filter them out yourself after getting the listing.
0 votes
by (580 points)
Thanks for your reply but it seems your FTPFile object doesn't seem to be having such property that indicates that this file is hidden. As per your suggestion
i dont find a way other than checking name if starts with "."
Anyway
Is there any other way possible than listing all of them and manually discarding them ?
0 votes
by (162k points)
No, it doesn't have a hidden property - you have to check.

There's one other way to do it - supply a callback to the dirDetails method to filter them out on the fly. But either way you have to do the check.
0 votes
by (580 points)
K... Thanks
0 votes
by (180 points)
Hi!

I'm trying to list all files and directories plus the hidden files.

I'm using the method directoryList() in the class FileTransferClient and I'm only able to see the directories and files of the current directory.

How can I see the hidden files? How can I include them in the list when I call the method directoryList?

I can see all the files including hidden files when I'm using Filezilla so the server can send them as part of the list.

I have also gave a look to the dirDetails("-a dirname") but this method is from the class FTPClient, not in FileTransferClient, and FTPClient would be deprecated.

How can I list all my files including hidden files with the class FileTransferClient?

Thanks in advance

By the way, I've seen the property showhiddenfiles for the .NET library (http://www.enterprisedt.com/products/edtftpnetcompact/doc/api/EnterpriseDT.Net.Ftp.FTPConnection.ShowHiddenFiles.html). Is there something similar for the java library?
0 votes
by (51.6k points)
Have you tried directoryList("-a dirName") ?

- Hans (EnterpriseDT)
0 votes
by (180 points)
Thanks, it works. BTW it also works with directoryNameList("-a ...

Thanks again
0 votes
by (140 points)
Have you tried directoryList("-a dirName") ?

- Hans (EnterpriseDT)


Hello,

We are EDTFPJ Pro users,
Is it possible to make it cleaner by adding parameters in the called method (directoryList()) + documentation update --> http://enterprisedt.com/products/edtftp ... sting.html ?
I've lost an half hour on this point.

Adding a recursive delete could be also an added value (if it's not already done).

Thank you!

Kind regards,

Massimo Pacini
0 votes
by (162k points)
I'm not sure what you mean in regard to directoryList() - please clarify.

There is already a recursive delete.
0 votes
by (140 points)
Hi,

I'm not sure what you mean in regard to directoryList() - please clarify.

Probably adding new versions of the directoryList() methods including a boolean showHiddenFiles parameter would be great.
Injecting the "-a" parameter by pretending it is part of the directory name clearly doesn't sound clean at all - not mentioning it is not documented.

There is already a recursive delete.


After searching, I found this :
https://enterprisedt.com/products/edtft ... .String%29
Is that what you mean ?
Coding it as static call sounds strange, but good to know.

Kind regards,

Vincent

Categories

...