4

I know there exists Apache Commons VFS which permits to connect to different FileSystem, where a FileSystem may be something like a FTP, HTTP, SFTP, Zip file or simply a local file system.

I am wondering, after some search (most on Google and VFS site) that resulted in nothing, is there were an implementation of java.nio.FileSystem that would wrap VFS.

My use case is the following: I have a personal project where I need to read file content, or list directory content, to do something with this content (such as indexing, etc).

I am currently using java.nio.Path to represent the path of file I am reading, and I'd like to add later a feature to work with a SSH connection (I have no need for this "now", but the question still interests me).

NoDataFound
  • 11,381
  • 33
  • 59
  • If it isn't a requirement then why trying to bolt it on already? If you don't need it you don't need it, don't add feature because they are nice or might be needed somehwere in the possible future... Adding things that aren't used is basically adding technical debt and additional maintaince for code that is never used. – M. Deinum Sep 24 '14 at 12:43
  • 1
    It is a personal project I'm working on - I won't say there is no technical debt, but it is less important. Working with Java NIO is easier for me, and perhaps my question is misworded: I'm looking for an implementation of NIO `FileSystem` that would wrap Commons VFS. Then, I won't need to change my code that much _if_ I were implementing this feature. – NoDataFound Sep 24 '14 at 14:23
  • There, I reworded my question – NoDataFound Sep 24 '14 at 14:57
  • Writing this wrapper could be another interesting project ;) – gontard Sep 24 '14 at 16:02
  • It sure would be an interesting project. I'll try that when I'll need it, and if this question is not answered ;) – NoDataFound Sep 24 '14 at 20:28
  • @NoDataFound did you find or implement a solution? can you share the answer (I'm looking for a FileSystem wrapper for VFS's `ram`) ? – bachr Dec 19 '14 at 16:15
  • I did not implements a wrapper, nor did I found a solution. – NoDataFound Dec 19 '14 at 21:39
  • 1
    @bachr Look at https://github.com/google/jimfs – Tavian Barnes Mar 22 '16 at 22:16
  • As for my question, I found that https://truevfs.java.net/ does all that I needed. – NoDataFound Mar 22 '16 at 22:41
  • thanks @TavianBarnes for point to that project – bachr Mar 24 '16 at 11:43

0 Answers0