private static FileSystemView createDefaultView ( Configuration config , JimfsFileStore fileStore , PathService pathService ) throws IOException { JimfsPath workingDirPath = pathService . parsePath ( config . workingDirectory ) ; Directory dir = fileStore . getRoot ( workingDirPath . root ( ) ) ; if ( dir == null ) { throw new IllegalArgumentException ( "Invalid working dir path: " + workingDirPath ) ; } for ( Name name : workingDirPath . names ( ) ) { Directory newDir = fileStore . directoryCreator ( ) . get ( ) ; fileStore . setInitialAttributes ( newDir ) ; dir . link ( name , newDir ) ; dir = newDir ; } return new FileSystemView ( fileStore , dir , workingDirPath ) ; }
Creates the default view of the file system using the given working directory .