Examples of FileSystemProvider


Examples of org.uberfire.java.nio.file.spi.FileSystemProvider

        path.relativize( other );
    }

    @Test(expected = IllegalArgumentException.class)
    public void testRelativizeWindowsIllegal2() {
        final FileSystemProvider fsprovider = mock( FileSystemProvider.class );
        when( fsprovider.isDefault() ).thenReturn( true );
        when( fsprovider.getScheme() ).thenReturn( "file" );
        when( fs.provider() ).thenReturn( fsprovider );

        when( fs.getSeparator() ).thenReturn( "/" );

        final Path path = create( fs, "some\\place", false );
View Full Code Here

Examples of org.uberfire.java.nio.file.spi.FileSystemProvider

        path.relativize( other );
    }

    @Test(expected = IllegalArgumentException.class)
    public void testRelativizeWindowsIllegal3() {
        final FileSystemProvider fsprovider = mock( FileSystemProvider.class );
        when( fsprovider.isDefault() ).thenReturn( true );
        when( fsprovider.getScheme() ).thenReturn( "file" );
        when( fs.provider() ).thenReturn( fsprovider );

        when( fs.getSeparator() ).thenReturn( "/" );

        final Path path = create( fs, "", false );
View Full Code Here

Examples of org.uberfire.java.nio.file.spi.FileSystemProvider

        path.relativize( other );
    }

    @Test(expected = IllegalArgumentException.class)
    public void testRelativizeWindowsIllegal4() {
        final FileSystemProvider fsprovider = mock( FileSystemProvider.class );
        when( fsprovider.isDefault() ).thenReturn( true );
        when( fsprovider.getScheme() ).thenReturn( "file" );
        when( fs.provider() ).thenReturn( fsprovider );

        when( fs.getSeparator() ).thenReturn( "/" );

        final Path path = create( fs, "d:\\path\\to", false );
View Full Code Here

Examples of org.uberfire.java.nio.file.spi.FileSystemProvider

        }
    }

    @Test
    public void testRelativize() {
        final FileSystemProvider fsprovider = mock(FileSystemProvider.class);
        when(fsprovider.isDefault()).thenReturn(true);
        when(fsprovider.getScheme()).thenReturn("file");
        when(fs.provider()).thenReturn(fsprovider);

        when(fs.getSeparator()).thenReturn("/");

        final Path path = JGitPathImpl.create(fs, "/path/to", "master@my-host", false);
View Full Code Here

Examples of org.uberfire.java.nio.file.spi.FileSystemProvider

            throws UnsupportedOperationException, FileAlreadyExistsException,
            DirectoryNotEmptyException, IOException, SecurityException {
        checkNotNull( "source", source );
        checkNotNull( "target", target );

        final FileSystemProvider provider = providerOf( source );
        if ( providerOf( target ) == provider ) {
            provider.copy( source, target, options );
            return target;
        }

        throw new UnsupportedOperationException( "can't copy from different providers" );
    }
View Full Code Here

Examples of org.uberfire.java.nio.file.spi.FileSystemProvider

            throws UnsupportedOperationException, FileAlreadyExistsException, DirectoryNotEmptyException,
            AtomicMoveNotSupportedException, IOException, SecurityException {
        checkNotNull( "source", source );
        checkNotNull( "target", target );

        final FileSystemProvider provider = providerOf( source );
        if ( providerOf( target ) == provider ) {
            provider.move( source, target, options );
            return target;
        }
        throw new UnsupportedOperationException( "can't move from different providers" );
    }
View Full Code Here

Examples of org.uberfire.java.nio.file.spi.FileSystemProvider

    }

    private static synchronized Map<String, FileSystemProvider> buildProvidersMap() {
        final Map<String, FileSystemProvider> result = new HashMap<String, FileSystemProvider>( installedProviders.size() + 1 );
        for ( int i = 0; i < installedProviders.size(); i++ ) {
            final FileSystemProvider provider = installedProviders.get( i );
            if ( i == 0 ) {
                provider.forceAsDefault();
                result.put( "default", provider );
            }
            result.put( provider.getScheme(), provider );
        }
        return unmodifiableMap( result );
    }
View Full Code Here

Examples of org.uberfire.java.nio.file.spi.FileSystemProvider

    private static FileSystemProvider getProvider( final String scheme )
            throws FileSystemNotFoundException, ServiceConfigurationError {
        checkNotEmpty( "scheme", scheme );

        final FileSystemProvider fileSystemProvider = mapOfinstalledProviders.get( scheme );

        if ( fileSystemProvider == null ) {
            throw new FileSystemNotFoundException( "Provider '" + scheme + "' not found" );
        }
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.