edu.northwestern.at.utils

## Class DirUtils

- java.lang.Object
- - edu.northwestern.at.utils.DirUtils

-     public class DirUtils
      extends java.lang.Object

  Directory utilities.

  This static class provides various utility methods for manipulating directories.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static int` | `MAX_DIR_CREATE_TRIES` Maximum number of tries to create a temporary directory.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `DirUtils()` Don't allow instantiation, do allow overrides.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.io.File` | `createTemporaryDirectory(java.lang.String baseName)` Create a temporary directory.
    `static boolean` | `deleteDirectory(java.io.File directory)` Delete a directory.
    `static boolean` | `deleteDirectory(java.lang.String directory)` Delete a directory.
    `protected static void` | `emptyOutDirectory(java.io.File directory)` Empty out a directory.
    `static java.lang.String` | `getTemporaryFilesDirectory()` Get temporary files directory.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### MAX_DIR_CREATE_TRIES

          protected static int MAX_DIR_CREATE_TRIES

      Maximum number of tries to create a temporary directory.

  - ### Constructor Detail

    - #### DirUtils

          protected DirUtils()

      Don't allow instantiation, do allow overrides.

  - ### Method Detail

    - #### getTemporaryFilesDirectory

          public static java.lang.String getTemporaryFilesDirectory()

      Get temporary files directory.
      Returns:
        Temporary files directory.

    - #### createTemporaryDirectory

          public static java.io.File createTemporaryDirectory(java.lang.String baseName)
                                                       throws java.lang.IllegalStateException

      Create a temporary directory.
      Parameters:
        `baseName` - Base name for generating temporory name.
      Returns:
        Temporary directory.
      Throws:
        `java.lang.IllegalStateException` - If temporary directory cannot be created.

    - #### deleteDirectory

          public static boolean deleteDirectory(java.io.File directory)

      Delete a directory.
      Parameters:
        `directory` - Directory to delete
      Returns:
        true if directory deleted, false otherwise.

    - #### deleteDirectory

          public static boolean deleteDirectory(java.lang.String directory)

      Delete a directory.
      Parameters:
        `directory` - Directory to delete
      Returns:
        true if directory deleted, false otherwise.

    - #### emptyOutDirectory

          protected static void emptyOutDirectory(java.io.File directory)

      Empty out a directory.
      Parameters:
        `directory` - Directory to empty.