/** * Initialize and configure a new file system with the given provider and URI, using the given * configuration. */ public static JimfsFileSystem newFileSystem( JimfsFileSystemProvider provider, URI uri, Configuration config) throws IOException { PathService pathService = new PathService(config); FileSystemState state = new FileSystemState(removeFileSystemRunnable(uri)); JimfsFileStore fileStore = createFileStore(config, pathService, state); FileSystemView defaultView = createDefaultView(config, fileStore, pathService); WatchServiceConfiguration watchServiceConfig = config.watchServiceConfig; JimfsFileSystem fileSystem = new JimfsFileSystem(provider, uri, fileStore, pathService, defaultView, watchServiceConfig); pathService.setFileSystem(fileSystem); return fileSystem; }
/** * Initialize and configure a new file system with the given provider and URI, using the given * configuration. */ public static JimfsFileSystem newFileSystem( JimfsFileSystemProvider provider, URI uri, Configuration config) throws IOException { PathService pathService = new PathService(config); FileSystemState state = new FileSystemState(removeFileSystemRunnable(uri)); JimfsFileStore fileStore = createFileStore(config, pathService, state); FileSystemView defaultView = createDefaultView(config, fileStore, pathService); WatchServiceConfiguration watchServiceConfig = config.watchServiceConfig; JimfsFileSystem fileSystem = new JimfsFileSystem(provider, uri, fileStore, pathService, defaultView, watchServiceConfig); pathService.setFileSystem(fileSystem); return fileSystem; }