Examples of FileSystemException


Examples of ca.pgon.saviorlib.Exceptions.FileSystemException

        this.user = user;
    }

    public void checkIfValid() {
        if (basePath == null) {
            throw new FileSystemException("No base path defined");
        }
       
        if (hostname == null) {
            throw new FileSystemException("No host defined");
        }
       
        if (user == null) {
            throw new FileSystemException("No login defined");
        }
       
        if (pass == null) {
            throw new FileSystemException("No password defined");
        }
       
        connectIfNotConnected();
       
        try {
            if (!ftpClient.changeWorkingDirectory(basePath)) {
                throw new FileSystemException("The basepath is invalid");
            }
        } catch (IOException ex) {
            throw new FileSystemException("The basepath is invalid");
        }
    }
View Full Code Here

Examples of com.cloudhopper.commons.rfs.FileSystemException

    }

    public void copy(File srcFile, String filename) throws FileSystemException {
        // make sure the file exists
        if (!srcFile.exists()) {
            throw new FileSystemException("Source file " + srcFile.getName() + " does not exist");
        }

        // make sure we are permitted to read it
        if (!srcFile.canRead()) {
            throw new FileSystemException("Cannot read source file " + srcFile.getName() + " (permission denied?)");
        }

        // open an input stream
        FileInputStream in = null;
        try {
            in = new FileInputStream(srcFile);
        } catch (Exception e) {
            throw new FileSystemException("Unable to create input stream for file " + srcFile.getName(), e);
        }

        try {
            // delegate handling to input stream method
            copy(in, filename);
View Full Code Here

Examples of io.vertx.core.file.FileSystemException

                });
          } else {
            Files.copy(source, target);
          }
        } catch (IOException e) {
          throw new FileSystemException(e);
        }
        return null;
      }
    };
  }
View Full Code Here

Examples of java.nio.file.FileSystemException

    try {
      DirectoryEntry entry = lookUp(path, options);
      if (entry.exists()) {
        File file = entry.file();
        if (!file.isRegularFile()) {
          throw new FileSystemException(path.toString(), null, "not a regular file");
        }
        return open((RegularFile) file, options);
      } else {
        return null;
      }
View Full Code Here

Examples of net.sourceforge.fullsync.FileSystemException

  @Override
  public TaskTree execute(Site source, Site destination, ActionDecider actionDecider, RuleSet rules) throws DataParseException,
  FileSystemException, IOException {
    if (!source.isAvailable()) {
      throw new FileSystemException("source is unavailable");
    }
    if (!destination.isAvailable()) {
      throw new FileSystemException("destination is unavailable");
    }

    this.actionDecider = actionDecider;

    TaskTree tree = new TaskTree(source, destination);
View Full Code Here

Examples of org.apache.commons.vfs.FileSystemException

        {
            return FileType.IMAGINARY;
        }
        else
        {
            throw new FileSystemException("vfs.provider.http/head.error", getName());
        }
    }
View Full Code Here

Examples of org.apache.commons.vfs.FileSystemException

        throws Exception
    {
        final Header header = method.getResponseHeader("last-modified");
        if (header == null)
        {
            throw new FileSystemException("vfs.provider.http/last-modified.error", getName());
        }
        return DateParser.parseDate(header.getValue()).getTime();
    }
View Full Code Here

Examples of org.apache.commons.vfs.FileSystemException

        final GetMethod getMethod = new GetMethod();
        setupMethod(getMethod);
        final int status = fileSystem.getClient().executeMethod(getMethod);
        if (status != HttpURLConnection.HTTP_OK)
        {
            throw new FileSystemException("vfs.provider.http/get.error", getName());
        }

        return new HttpInputStream(getMethod);
    }
View Full Code Here

Examples of org.apache.commons.vfs.FileSystemException

            {
                element = header.getValues();
            }
            catch (HttpException e)
            {
                throw new FileSystemException(e);
            }
            if (element != null && element.length > 0)
            {
                contentType = element[0].getName();
            }
View Full Code Here

Examples of org.apache.commons.vfs.FileSystemException

            client.executeMethod(new HeadMethod());
        }
        catch (final Exception exc)
        {
            throw new FileSystemException("vfs.provider.http/connect.error", new Object[]{hostname}, exc);
        }

        return client;
    }
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.