Fix access from
SystemJimfsFileSystemProvidertoJimfsFileSystemwhen they are in “different packages” (from different class loaders).Fixes https://github.com/google/jimfs/issues/476
RELNOTES=Fixed access from
SystemJimfsFileSystemProvidertoJimfsFileSystemwhen they are loaded by different class loaders. PiperOrigin-RevId: 923513904
Jimfs
Jimfs is an in-memory file system for Java 8 and above, implementing the java.nio.file abstract file system APIs.
Getting started
The latest release is 1.3.0.
It is available in Maven Central as com.google.jimfs:jimfs:1.3.0:
Basic use
The simplest way to use Jimfs is to just get a new
FileSysteminstance from theJimfsclass and start using it:What’s supported?
Jimfs supports almost all the APIs under
java.nio.file. It supports:FileChannelorSeekableByteChannel,InputStream,OutputStream, etc.SecureDirectoryStream, for operations relative to an open directory.PathMatcher.WatchService.Jimfs also supports creating file systems that, for example, use Windows-style paths and (to an extent) behavior. In general, however, file system behavior is modeled after UNIX and may not exactly match any particular real file system or platform.
License