This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Is there a FileSystemView wrapper for an FTPClient that I can use Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Is there a FileSystemView wrapper for an FTPClient that I can use" Watch "Is there a FileSystemView wrapper for an FTPClient that I can use" New topic
Author

Is there a FileSystemView wrapper for an FTPClient that I can use

Pat O'Hara
Greenhorn

Joined: Nov 02, 2011
Posts: 7
Hello,
I am in the process of writing a FileSystemView wrapper for the Apache FTPClient in commons.net. It is surprising to me that there is not already such a class. My goal is to add the file system for a hardware device to the JFileChooser dialog. The device in question allows access via FTP. It has a single virtual folder (Cannot create sub folders). I will continue to write the wrapper, but thought I would through the question out here, has this already been done?

Pat O
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19908
    
  23

I think the number one reason there is no such FileSystemView implementation yet is the poor design of FileSystemView. It's built around java.io.File, which can only handle files on the local system and on Windows / NFS shares. If you write a FileSystemView around FTPClient, you would have to make sure that you don't use the File objects directly, because that will fail.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there a FileSystemView wrapper for an FTPClient that I can use