Examples of NotDirectoryException


Examples of java.nio.file.NotDirectoryException

    Key key = super.register(path, eventTypes);

    Snapshot snapshot = takeSnapshot(path);

    if (snapshot == null) {
      throw new NotDirectoryException(path.toString());
    }

    synchronized (this) {
      snapshots.put(key, snapshot);
      if (pollingFuture == null) {
View Full Code Here

Examples of java.nio.file.NotDirectoryException

   */
  public DirectoryEntry requireDirectory(
      Path pathForException) throws NoSuchFileException, NotDirectoryException {
    requireExists(pathForException);
    if (!file().isDirectory()) {
      throw new NotDirectoryException(pathForException.toString());
    }
    return this;
  }
View Full Code Here

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

            throws NotDirectoryException, IOException, SecurityException {
        checkNotNull( "filter", filter );
        final File file = checkNotNull( "dir", dir ).toFile();

        if ( !file.isDirectory() ) {
            throw new NotDirectoryException( dir.toString() );
        }
        final File[] content = file.listFiles();

        if ( content == null ) {
            throw new NotDirectoryException( dir.toString() );
        }

        return new DirectoryStream<Path>() {
            boolean isClosed = false;
View Full Code Here

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

        final JGitPathImpl gPath = toPathImpl( path );

        final Pair<PathType, ObjectId> result = checkPath( gPath.getFileSystem().gitRepo(), gPath.getRefTree(), gPath.getPath() );

        if ( !result.getK1().equals( PathType.DIRECTORY ) ) {
            throw new NotDirectoryException( path.toString() );
        }

        final List<JGitPathInfo> pathContent = listPathContent( gPath.getFileSystem().gitRepo(), gPath.getRefTree(), gPath.getPath() );

        return new DirectoryStream<Path>() {
View Full Code Here

Examples of scalax.file.NotDirectoryException

        // Store the file.
        // Before do that, create upload directory if it doesn't exist.
        File uploads = new File(uploadDirectory);
        uploads.mkdirs();
        if (!uploads.isDirectory()) {
            throw new NotDirectoryException(
                    "'" + file.getAbsolutePath() + "' is not a directory.");
        }
        File attachedFile = new File(uploadDirectory, hash);
        boolean isMoved = file.renameTo(attachedFile);
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.