/** @throws IOException */ protected void lockDirectory() throws IOException { File locking = new File(this.getFile(), ".locking"); if (!locking.exists()) { locking.createNewFile(); } }
/** * This method will write an empty ".locking" file into the uploaded data unique directory. * * <p>Whenever a ".locking" file is present, the scheduler won't wipe out the directory. * Otherwise the folder will be completely removed. * * @param directory * @throws IOException */ public void lockUploadFolder(Directory directory) throws IOException { if (directory != null) { File locking = new File(directory.getFile(), ".locking"); if (!locking.exists()) { locking.createNewFile(); } } }
/** * This method will delete any ".locking" file present into the uploaded data unique directory. * * <p>Whenever a ".locking" file is present, the scheduler won't wipe out the directory. * Otherwise the folder will be completely removed. * * @param directory */ public void unlockUploadFolder(Directory directory) { if (directory != null) { File locking = new File(directory.getFile(), ".locking"); if (locking.exists()) { locking.delete(); } } }
File file(ImportData data) { //try file based File f = null; if (data instanceof SpatialFile) { f = ((SpatialFile) data).getFile(); } if (data instanceof Directory) { f = ((Directory) data).getFile(); } return f; }
/** * Create archive from a file. * * @param file the file * @throws IOException */ public Archive(File file) throws IOException { super(Directory.createFromArchive(file).getFile()); } }
File file(ImportData data) { // try file based File f = null; if (data instanceof SpatialFile) { f = ((SpatialFile) data).getFile(); } if (data instanceof Directory) { f = ((Directory) data).getFile(); } return f; }
public Archive(File file) throws IOException { super(Directory.createFromArchive(file).getFile()); }
public AbstractGridCoverage2DReader gridReader(ImportData data) throws IOException { // try file based File f = null; if (data instanceof SpatialFile) { f = ((SpatialFile) data).getFile(); } if (data instanceof Directory) { f = ((Directory) data).getFile(); } if (f != null) { AbstractGridFormat gridFormat = gridFormat(); return gridFormat.getReader(f); } return null; }
public AbstractGridCoverage2DReader gridReader(ImportData data) throws IOException { //try file based File f = null; if (data instanceof SpatialFile) { f = ((SpatialFile) data).getFile(); } if (data instanceof Directory) { f = ((Directory) data).getFile(); } if (f != null) { AbstractGridFormat gridFormat = gridFormat(); return gridFormat.getReader(f); } return null; }
f = ((Directory) data).getFile();
f = ((Directory) data).getFile();
LOGGER.fine("Archiving directory " + directory.getFile().getAbsolutePath());
LOGGER.fine("Archiving directory " + directory.getFile().getAbsolutePath());