congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FileSystemHelper.cleanDirectory
Code IndexAdd Tabnine to your IDE (free)

How to use
cleanDirectory
method
in
com.ebmwebsourcing.easycommons.io.FileSystemHelper

Best Java code snippets using com.ebmwebsourcing.easycommons.io.FileSystemHelper.cleanDirectory (Showing top 2 results out of 315)

origin: com.ebmwebsourcing.easycommons/easycommons-io

/**
 * Deletes a directory recursively.
 * 
 * @param directory
 *            directory to delete
 * @throws IOException
 *             in case deletion is unsuccessful
 */
private static void deleteDirectory(File directory) throws IOException {
  if (!directory.exists()) {
    return;
  }
  cleanDirectory(directory);
  if (!directory.delete()) {
    String message = "Unable to delete directory " + directory + ".";
    throw new IOException(message);
  }
}
origin: org.ow2.easycommons/easycommons-io

/**
 * Deletes a directory recursively.
 * 
 * @param directory
 *            directory to delete
 * @throws IOException
 *             in case deletion is unsuccessful
 */
private static void deleteDirectory(File directory) throws IOException {
  if (!directory.exists()) {
    return;
  }
  cleanDirectory(directory);
  if (!directory.delete()) {
    String message = "Unable to delete directory " + directory + ".";
    throw new IOException(message);
  }
}
com.ebmwebsourcing.easycommons.ioFileSystemHelpercleanDirectory

Javadoc

Cleans a directory without deleting it.

Popular methods of FileSystemHelper

  • createTempDir
  • deleteDirectory
    Deletes a directory recursively.
  • forceDelete
    Deletes a file. If file is a directory, delete it and all sub-directories. The difference between Fi
  • getSystemTempDir

Popular in Java

  • Making http requests using okhttp
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • ImageIO (javax.imageio)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now