Package fr.norsys.mapper.console.exception

Examples of fr.norsys.mapper.console.exception.FileException


    try {
      validateDirectory(directoryPath);
      File file = new File(directoryPath + name);
      file.createNewFile();
    } catch (IOException e) {
      throw new FileException("Impossible to create file " + directoryPath + name + ": "+e);
    }
  }
View Full Code Here


  public void deleteFile(String name, String directoryPath) throws FileException {
    validateDirectory(directoryPath);
    File file = new File(directoryPath+name);
    if(!file.exists() || !file.delete())
      throw new FileException("Impossible to delete file " + directoryPath + name);
  }
View Full Code Here

      throws FileException {
    validateDirectory(directoryPath);
    File f = new File(directoryPath+previousName);
    File f2 = new File(directoryPath+newName);
    if(!f.renameTo(f2))
      throw new FileException(f.getName()+ " can't be renamed");
  }
View Full Code Here

TOP

Related Classes of fr.norsys.mapper.console.exception.FileException

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.