Package org.uberfire.java.nio.file.spi

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


            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

            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

    }

    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

    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

Related Classes of org.uberfire.java.nio.file.spi.FileSystemProvider

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.