Examples of newFileSystem()


Examples of java.nio.file.spi.FileSystemProvider.newFileSystem()

            List<Path> files = listJars(webInfLibDirectory);

            for (Path p : files) {
                info("LOCATED JAR " + p.toFile().getName());
                jarURLs.add(p.toUri().toURL());
                FileSystem fs = provider.newFileSystem(p, new HashMap<String, Object>());
                Path serviceDirectory = fs.getPath("/META-INF", "services");
                info("SCANNING SERVICES");

                if (Files.exists(serviceDirectory)) {
                    DirectoryStream<Path> serviceListings = Files.newDirectoryStream(serviceDirectory);
View Full Code Here

Examples of java.nio.file.spi.FileSystemProvider.newFileSystem()

                Vector3i chunkZipPos = storagePathProvider.getChunkZipPosition(chunkPos);
                FileSystem zip = newChunkZips.get(chunkZipPos);
                if (zip == null) {
                    Path targetPath = storagePathProvider.getChunkZipTempPath(chunkZipPos);
                    Files.deleteIfExists(targetPath);
                    zip = zipProvider.newFileSystem(targetPath, CREATE_ZIP_OPTIONS);
                    newChunkZips.put(chunkZipPos, zip);
                }
                Path chunkPath = zip.getPath(storagePathProvider.getChunkFilename(chunkPos));
                CompressedChunkBuilder compressedChunkBuilder = entry.getValue();
                byte[] compressedChunk = compressedChunkBuilder.buildEncodedChunk();
View Full Code Here

Examples of org.uberfire.io.IOService.newFileSystem()

                final CreationalContext<IOService> _ctx = bm.createCreationalContext( bean );
                final IOService ioService = (IOService) bm.getReference( bean, IOService.class, _ctx );

                FileSystem systemFS;
                try {
                    systemFS = ioService.newFileSystem( URI.create( "git://system" ),
                                                        new HashMap<String, Object>() {{
                                                            put( "init", Boolean.TRUE );
                                                        }} );
                } catch ( FileSystemAlreadyExistsException e ) {
                    systemFS = ioService.getFileSystem( URI.create( "git://system" ) );
View Full Code Here

Examples of org.uberfire.java.nio.fs.file.SimpleFileSystemProvider.newFileSystem()

    @Test(expected = FileSystemAlreadyExistsException.class)
    public void newFileSystemCantCreateURI() {
        final SimpleFileSystemProvider fsProvider = new SimpleFileSystemProvider();

        fsProvider.newFileSystem( URI.create( "file:///" ), new HashMap<String, Object>() );
    }

    @Test(expected = FileSystemAlreadyExistsException.class)
    public void newFileSystemCantCreatePath() {
        final SimpleFileSystemProvider fsProvider = new SimpleFileSystemProvider();
View Full Code Here

Examples of org.uberfire.java.nio.fs.file.SimpleFileSystemProvider.newFileSystem()

    public void newFileSystemCantCreatePath() {
        final SimpleFileSystemProvider fsProvider = new SimpleFileSystemProvider();
        final URI uri = URI.create( "file:///" );
        final Path path = GeneralPathImpl.create( fsProvider.getFileSystem( uri ), uri.getPath(), false );

        fsProvider.newFileSystem( path, new HashMap<String, Object>() );
    }

    @Test
    public void checkNewInputStream() throws IOException {
        final File temp = File.createTempFile( "foo", "bar" );
View Full Code Here

Examples of org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider.newFileSystem()

        final JGitFileSystemProvider provider = new JGitFileSystemProvider();

        final URI newRepo = URI.create("git://repo-name");

        provider.newFileSystem(newRepo, EMPTY_ENV);

        final String[] names = dir.list();

        assertThat(names).isNotEmpty().contains(".niogit");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.