4

Is there a java-library that operates on a user-provided java.nio.file.FileSystem ?

I'm using googles jimfs in-memory-filesystem implementation and would like to clone a git repository into my filesystem and perform a complex series of operations but don't touch the disk.

Unfortunately it does not seem like jgit-api provides the possibility to operate on a FileSystem of choice.

EDIT:

The reason for the incompatibility between jgit and jimfs seems to be in the fact that jgit's api uses the file and jimfs uses paths as its main abstraction. Unfortunately jimfs does not implement Path.toFile(). Any technical reasons for that ?

Gaetano
  • 1,090
  • 1
  • 9
  • 25
  • The question is unclear. Isn't jimfs a "user-provided" Filesystem? – john16384 Feb 21 '17 at 14:36
  • 1
    yes, but jgit api seems not to operate on user-provided filesystems. – Gaetano Feb 21 '17 at 14:40
  • So you want a different jgit library that works with `java.nio.file.FileSystem`... that might be hard to find. It may be easier to create a RAM disk instead and have it operate on that. – john16384 Feb 21 '17 at 15:03
  • I want this too! –  Mar 16 '17 at 11:38
  • +1 JGit is a good Git implementation, but it works on `File` rather than `Path`, which prevents it from working on JimFS. – sdgfsdh Jun 19 '17 at 10:29
  • See jGit example here: https://stackoverflow.com/questions/31271278/clone-a-git-repository-into-an-inmemoryrepository-with-jgit/54486558#54486558 – msangel Feb 01 '19 at 20:16

0 Answers0