JFileChooser browsing a remote file system
Asked Answered
H

3

2

I am trying to Implement a JFileChooser that allows a user to select files on a remote system via ftp.

Everything I've read says this can be accomplished by extending FileSystemView so that all the file system methods (getFiles, etc) are overridden and routed across ftp.

I haven't had any luck implementing this, as FileSystemView appears to still be calling local functions.

Can anyone confirm that this can be done and/or point me in a good direction?

Hungry answered 13/11, 2009 at 22:0 Comment(1)
I don't follow. If you override all the methods in FileSystemView, it wont get a chance to call anything.Gono
B
3

Try vfsjfilechooser

Bedfellow answered 13/11, 2009 at 22:25 Comment(0)
K
0

If you want to implement your own FileSystemView and prevent access to the local file systems, you must of course override all methods or at least getSystemDisplayName and all the is* methods. Another problem is of course that the FileSystemView interface is closely linked to the File class, so it may not be trivial to provide a non-file-based implementation.

Kolomna answered 13/11, 2009 at 22:29 Comment(0)
F
0

I am pretty sure this could be done. For a starter you could check out how the author of MediaChest (aka PhotoOrganizer) has done it.

Discovered the relevant code files here Codase: FtpFileSystemView

Foster answered 14/11, 2009 at 0:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.