/** * Delete any temporary files. After this method is called, iterator() may not be called. */ public void cleanup() { this.iterationStarted = true; this.cleanedUp = true; IOUtil.deleteFiles(this.files); }
/** * Delete any temporary files. After this method is called, no other method calls should be made on this object. */ public void cleanup() { this.doneAdding = true; this.cleanedUp = true; this.ramValues = null; IOUtil.deleteFiles(this.files); }
/** * Delete any temporary files. After this method is called, iterator() may not be called. */ public void cleanup() { this.iterationStarted = true; this.cleanedUp = true; IOUtil.deleteFiles(this.files); }
/** * Delete any temporary files. After this method is called, iterator() may not be called. */ public void cleanup() { this.iterationStarted = true; this.cleanedUp = true; IOUtil.deleteFiles(this.files); }
void close() { CloserUtil.close(is); IOUtil.deleteFiles(file); } }
/** * Executes the given R script that is stored in a file on the classpath. The script file * is read from the classpath and written to a temp file then executed by a call to Rscript. * Blocks until the R script is complete. * * @param rScriptName the fully qualified name of the classpath resource of the script * @param arguments any arguments required by the script * @return the return code of the R process */ public static int executeFromClasspath(final String rScriptName, final String... arguments) { final File scriptFile = writeScriptFile(rScriptName); final int returnCode = executeFromFile(scriptFile, arguments); htsjdk.samtools.util.IOUtil.deleteFiles(scriptFile); return returnCode; }
/** * Executes the given R script that is stored in a file on the classpath. The script file * is read from the classpath and written to a temp file then executed by a call to Rscript. * Blocks until the R script is complete. * * @param rScriptName the fully qualified name of the classpath resource of the script * @param arguments any arguments required by the script * @return the return code of the R process */ public static int executeFromClasspath(final String rScriptName, final String... arguments) { final File scriptFile = writeScriptFile(rScriptName); final int returnCode = executeFromFile(scriptFile, arguments); htsjdk.samtools.util.IOUtil.deleteFiles(scriptFile); return returnCode; }
public static void deleteRelativeFiles(final File baseFile, final List<String> relativeFilesToDelete) { for (final String relativeFile : relativeFilesToDelete) { final File actualFile = new File(baseFile, relativeFile); if (!actualFile.exists()) { throw new RuntimeException("Trying to delete a non-existent file" + actualFile.getAbsolutePath()); } if (actualFile.isDirectory()) { IOUtil.deleteDirectoryTree(actualFile); } else { IOUtil.deleteFiles(actualFile); } if (actualFile.exists()) { throw new RuntimeException("File still exists after calling delete: " + actualFile); } } }
CloserUtil.close(is); htsjdk.samtools.util.IOUtil.deleteFiles(mapOnDisk); } else if (numRecords != null && numRecords > 0) throw new IllegalStateException("Non-zero numRecords but " + mapOnDisk + " does not exist");
CloserUtil.close(is); htsjdk.samtools.util.IOUtil.deleteFiles(mapOnDisk); } else if (numRecords != null && numRecords > 0) throw new IllegalStateException("Non-zero numRecords but " + mapOnDisk + " does not exist");
CloserUtil.close(is); htsjdk.samtools.util.IOUtil.deleteFiles(mapOnDisk); } else if (numRecords != null && numRecords > 0) throw new IllegalStateException("Non-zero numRecords but " + mapOnDisk + " does not exist");