Package org.uberfire.java.nio.file

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


        synchronized ( this ) {

            final File file = path.toFile();
            try {
                if ( file.isDirectory() && !deleteNonEmptyDirectory( options ) && file.list().length > 0 ) {
                    throw new DirectoryNotEmptyException( path.toString() );
                }

                final boolean result = file.exists();

                try {
View Full Code Here


        if ( target.toFile().exists() ) {
            throw new FileAlreadyExistsException( target.toString() );
        }
        if ( source.toFile().isDirectory() && source.toFile().list().length > 0 ) {
            throw new DirectoryNotEmptyException( source.toString() );
        }

        try {
            if ( source.toFile().isDirectory() ) {
                FileUtils.copyDirectory( source.toFile(), target.toFile() );
View Full Code Here

        if ( target.toFile().exists() ) {
            throw new FileAlreadyExistsException( target.toString() );
        }

        if ( source.toFile().isDirectory() && source.toFile().list().length > 0 ) {
            throw new DirectoryNotEmptyException( source.toString() );
        }

        try {
            if ( source.toFile().isDirectory() ) {
                FileUtils.moveDirectory( source.toFile(), target.toFile() );
View Full Code Here

            if ( content.size() == 1 && content.get( 0 ).getPath().equals( path.getPath().substring( 1 ) + "/.gitignore" ) ) {
                delete( path.resolve( ".gitignore" ) );
                deleteResource( path, options );
                return;
            }
            throw new DirectoryNotEmptyException( path.toString() );
        }

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

            final List<JGitPathInfo> content = listPathContent( path.getFileSystem().gitRepo(), path.getRefTree(), path.getPath() );
            if ( content.size() == 1 && content.get( 0 ).getPath().equals( path.getPath().substring( 1 ) + "/.gitignore" ) ) {
                delete( path.resolve( ".gitignore" ) );
                return true;
            }
            throw new DirectoryNotEmptyException( path.toString() );
        }

        if ( result.getK1().equals( NOT_FOUND ) ) {
            return false;
        }
View Full Code Here

TOP

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

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.