public URI toURI() throws IOException { checkFolderExists(); return this.folder.toURI(); }
public File getFile(final String name) throws IOException { checkFolderExists(); return new File(folder, name); }
public File getFile(final String name) throws IOException { checkFolderExists(); return new File(folder, name); }
public URI toURI() throws IOException { checkFolderExists(); return this.folder.toURI(); }
public File newFile(final String name) throws IOException { checkFolderExists(); final File newFile = new File(folder, name); if (!newFile.createNewFile()) { throw new IOException("File " + newFile.getAbsolutePath() + " cannot be created"); } return newFile; }
public File newFile(final String name) throws IOException { checkFolderExists(); final File newFile = new File(folder, name); if (!newFile.createNewFile()) { throw new IOException("File " + newFile.getAbsolutePath() + " cannot be created"); } return newFile; }
public void delete() throws IOException { //System.err.println("DELETING FOLDER: " + folder); checkFolderExists(); IOUtil.deleteDir(folder); }
public void delete() throws IOException { //System.err.println("DELETING FOLDER: " + folder); checkFolderExists(); IOUtil.deleteDir(folder); }
public Map<String, byte[]> listFilesAsResources() throws IOException { checkFolderExists(); final Map<String, byte[]> resources = new HashMap<>(); final File[] files = this.folder.listFiles((FileFilter) FileFileFilter.FILE); if (files != null) { for (File file : files) { resources.put(file.getName(), getFileContent(file)); } } return resources; }
public Map<String, byte[]> listFilesAsResources() throws IOException { checkFolderExists(); final Map<String, byte[]> resources = new HashMap<>(); final File[] files = this.folder.listFiles((FileFilter) FileFileFilter.FILE); if (files != null) { for (File file : files) { resources.put(file.getName(), getFileContent(file)); } } return resources; }
public void copyTo(Folder destFolder) throws IOException { checkFolderExists(); destFolder.create(); FileUtils.copyDirectory(this.getFile(), destFolder.getFile()); }
public void copyTo(Folder destFolder) throws IOException { checkFolderExists(); destFolder.create(); FileUtils.copyDirectory(this.getFile(), destFolder.getFile()); }