Package org.uberfire.java.nio.file

Examples of org.uberfire.java.nio.file.FileSystem


    @Test
    public void testGetFileSystem() {
        final URI newRepo = URI.create( "git://new-repo-name" );

        final FileSystem fs = PROVIDER.newFileSystem( newRepo, EMPTY_ENV );

        assertThat( fs ).isNotNull();

        assertThat( PROVIDER.getFileSystem( newRepo ) ).isEqualTo( fs );
        assertThat( PROVIDER.getFileSystem( URI.create( "git://master@new-repo-name" ) ) ).isEqualTo( fs );
View Full Code Here


        final Map<String, Object> env = new HashMap<String, Object>() {{
            put( JGitFileSystemProvider.GIT_DEFAULT_REMOTE_NAME, origin.getRepository().getDirectory().toString() );
        }};

        final FileSystem fs = PROVIDER.newFileSystem( newRepo, env );

        assertThat( fs ).isNotNull();

        final Path path = PROVIDER.getPath( URI.create( "git://origin/master@inputstream-test-repo/myfile.txt" ) );
View Full Code Here

        final Map<String, Object> env = new HashMap<String, Object>() {{
            put( JGitFileSystemProvider.GIT_DEFAULT_REMOTE_NAME, origin.getRepository().getDirectory().toString() );
        }};

        final FileSystem fs = PROVIDER.newFileSystem( newRepo, env );

        assertThat( fs ).isNotNull();

        final Path path = PROVIDER.getPath( URI.create( "git://origin/master@xinputstream-test-repo/path/to/file/myfile.txt" ) );
View Full Code Here

        final Map<String, Object> env = new HashMap<String, Object>() {{
            put( JGitFileSystemProvider.GIT_DEFAULT_REMOTE_NAME, origin.getRepository().getDirectory().toString() );
        }};

        final FileSystem fs = PROVIDER.newFileSystem( newRepo, env );

        assertThat( fs ).isNotNull();

        final Path path = PROVIDER.getPath( URI.create( "git://origin/master@xxinputstream-test-repo/path/to" ) );
View Full Code Here

        final Map<String, Object> env = new HashMap<String, Object>() {{
            put( JGitFileSystemProvider.GIT_DEFAULT_REMOTE_NAME, origin.getRepository().getDirectory().toString() );
        }};

        final FileSystem fs = PROVIDER.newFileSystem( newRepo, env );

        assertThat( fs ).isNotNull();

        final Path path = PROVIDER.getPath( URI.create( "git://origin/master@inputstream-not-exists-test-repo/temp.txt" ) );
View Full Code Here

        final Map<String, Object> env = new HashMap<String, Object>() {{
            put( JGitFileSystemProvider.GIT_DEFAULT_REMOTE_NAME, origin.getRepository().getDirectory().toString() );
        }};

        final FileSystem fs = PROVIDER.newFileSystem( newRepo, env );

        assertThat( fs ).isNotNull();

        final Path path = PROVIDER.getPath( URI.create( "git://user_branch@outstream-test-repo/some/path/myfile.txt" ) );
View Full Code Here

        final Map<String, Object> env = new HashMap<String, Object>() {{
            put( JGitFileSystemProvider.GIT_DEFAULT_REMOTE_NAME, origin.getRepository().getDirectory().toString() );
        }};

        final FileSystem fs = PROVIDER.newFileSystem( newRepo, env );

        assertThat( fs ).isNotNull();

        final SimpleDateFormat formatter = new SimpleDateFormat( "dd/MM/yyyy" );
View Full Code Here

    @Override
    public FileSystem newFileSystem( final URI uri,
                                     final Map<String, ?> env ) throws IllegalArgumentException, FileSystemAlreadyExistsException, ProviderNotFoundException, IOException, SecurityException {
        try {
            final FileSystem fs = FileSystems.newFileSystem( uri, env );
            return registerFS( fs );
        } catch ( final FileSystemAlreadyExistsException ex ) {
            registerFS( FileSystems.getFileSystem( uri ) );
            throw ex;
        }
View Full Code Here

TOP

Related Classes of org.uberfire.java.nio.file.FileSystem

Copyright © 2018 www.massapicom. 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.