Questions tagged [jimfs]

An in-memory file system for Java 7+

Jimfs in an in-memory file system for Java 7+, implementing the java.nio.file abstract file system APIs.

23 questions
1
vote
1 answer

Jimfs path to ceylon Directory

I'm trying to create a directory (using ceylon's file module) in the Jimfs file system but I'm having problems with the Jimfs provider not being installed when accessing the filesystem from ceylon. This is my test program: // File:…
Gustav Karlsson
  • 1,151
  • 9
  • 25
1
vote
1 answer

Do I have to clean my Jimfs FileSystem after each test?

I'm using Jimfs in my tests like this: public class FooTest { private FileSystem fs = Jimfs.newFileSystem(Configuration.unix()); private List paths = new ArrayList<>(); private Path getPath(String first, String... more) { Path path =…
Olivier Grégoire
  • 33,839
  • 23
  • 96
  • 137
0
votes
0 answers

Sftp fileupload not working with Apache MINA SSHD and JIMFS in Docker Container

I'm dealing with a tough one: For testing purposes I use Apache Mina SSHD and JIMFS to mock a remote sftp server - only locally and in test environment. Never in production. In my Spring Boot application I start a Apache Mina sshd during application…
Markus
  • 1
  • 3
0
votes
1 answer

Create temp File object in jimfs?

I would like to get File object from jimfs - in order to use it with a 3rd party library. private FileSystem fs = Jimfs.newFileSystem(Configuration.unix()); Path path = Files.createTempFile( …
pixel
  • 24,905
  • 36
  • 149
  • 251
0
votes
2 answers

Bundling zip files in memory with Java

I need to bundle several zip files (jars). I've tried the following solutions: Pour from ZipInputStream to ZipOutputStream by going over each entry of the input-stream and copying it to the output stream (from what I understand this is mostly IO…
Vitali Melamud
  • 1,267
  • 17
  • 40
0
votes
0 answers

java URI pointing to virtual filesystem

I need to create a URI to a virtual filesystem (jimfs) in java. I need to do this so that I can add files to a zip archive (by defining the zipfile as a filesystem). How can I point the URI variable below to my virtual filesystem? (or, if that won't…
Steve
  • 4,457
  • 12
  • 48
  • 89
0
votes
1 answer

SQLite + Virtual File System?

I'm using an SQLite database and I want to open a .db file from within a Jimfs virtual file system. Using the following code I can import a file into the virtual file system: String databaseFilePath = "..."; Configuration configuration =…
BullyWiiPlaza
  • 17,329
  • 10
  • 113
  • 185
0
votes
1 answer

Reading a file created using virtual filesystem JIMFS

I have created a VFS using JIMFS. FileSystem virtualFS = Jimfs.newFileSystem(Configuration.unix()); Path virtualPath = virtualFS.getPath("resources/virtualFolder"); Files.createDirectories(virtualPath); Path refData =…
Betafish
  • 1,212
  • 3
  • 20
  • 45
1
2