Examples of NoSuchFileException


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

    public void delete( final Path path,
                        final DeleteOption... options ) throws NoSuchFileException, DirectoryNotEmptyException, IOException, SecurityException {
        checkNotNull( "path", path );

        if ( !path.toFile().exists() ) {
            throw new NoSuchFileException( path.toString() );
        }

        deleteIfExists( path, options );
    }
View Full Code Here

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

            throws UnsupportedOperationException, NoSuchFileException, AccessDeniedException, IOException, SecurityException {
        checkNotNull( "path", path );
        checkNotNull( "modes", modes );

        if ( !path.toFile().exists() ) {
            throw new NoSuchFileException( path.toString() );
        }

        if ( path.toFile() != null ) {
            for ( final AccessMode mode : modes ) {
                checkNotNull( "mode", mode );
View Full Code Here

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

        checkNotNull( "path", path );
        checkNotNull( "type", type );

        if ( !path.toFile().exists() ) {
            throw new NoSuchFileException( path.toString() );
        }

        final GeneralPathImpl gPath = toGeneralPathImpl( path );

        final V view = gPath.getAttrView( type );
View Full Code Here

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

            throws NoSuchFileException, UnsupportedOperationException, IOException, SecurityException {
        checkNotNull( "path", path );
        checkNotNull( "type", type );

        if ( !path.toFile().exists() ) {
            throw new NoSuchFileException( path.toString() );
        }

        if ( type == BasicFileAttributesImpl.class || type == BasicFileAttributes.class ) {
            final SimpleBasicFileAttributeView view = getFileAttributeView( path, SimpleBasicFileAttributeView.class, options );
            return (A) view.readAttributes();
View Full Code Here

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

                    continue;
                }
                return new ByteArrayInputStream( git.getRepository().open( tw.getObjectId( 0 ), Constants.OBJ_BLOB ).getBytes() );
            }
        } catch ( final Throwable t ) {
            throw new NoSuchFileException( "Can't find '" + gitPath + "' in tree '" + treeRef + "'" );
        } finally {
            if ( rw != null ) {
                rw.dispose();
            }
            if ( tw != null ) {
                tw.release();
            }
        }
        throw new NoSuchFileException( "" );
    }
View Full Code Here

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

                                                            final String branchName,
                                                            final String path ) {
        final JGitPathInfo pathInfo = resolvePath( fs.gitRepo(), branchName, path );

        if ( pathInfo == null ) {
            throw new NoSuchFileException( path );
        }

        final String gPath = fixPath( path );

        final ObjectId id = resolveObjectId( fs.gitRepo(), branchName );
View Full Code Here

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

                                                            final String branchName,
                                                            final String path ) {
        final JGitPathInfo pathInfo = resolvePath( fs.gitRepo(), branchName, path );

        if ( pathInfo == null ) {
            throw new NoSuchFileException( path );
        }

        final ObjectId id = resolveObjectId( fs.gitRepo(), branchName );
        final String gPath = fixPath( path );
View Full Code Here

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

            }
            throw new DirectoryNotEmptyException( path.toString() );
        }

        if ( result.getK1().equals( NOT_FOUND ) ) {
            throw new NoSuchFileException( path.toString() );
        }

        deleteResource( path, options );
    }
View Full Code Here

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

    public void deleteBranch( final JGitPathImpl path ) {
        final Ref branch = getBranch( path.getFileSystem().gitRepo(), path.getRefTree() );

        if ( branch == null ) {
            throw new NoSuchFileException( path.toString() );
        }

        JGitUtil.deleteBranch( path.getFileSystem().gitRepo(), branch );
    }
View Full Code Here

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

        checkCondition( "source and taget should have same setup", !hasSameFileSystem( source, target ) );
        if ( existsBranch( target ) ) {
            throw new FileAlreadyExistsException( target.toString() );
        }
        if ( !existsBranch( source ) ) {
            throw new NoSuchFileException( target.toString() );
        }
        createBranch( source, target );
    }
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.