Class Directory

java.lang.Object
org.antublue.test.engine.extras.Directory
All Implemented Interfaces:
AutoCloseable

public class Directory extends Object implements AutoCloseable
Class to implement a Directory class
  • Method Details

    • getFile

      public File getFile()
      Method to get a File
      Returns:
      a File
    • delete

      public void delete()
      Method to delete the directory
    • close

      public void close()
      Method to close (delete) the directory
      Specified by:
      close in interface AutoCloseable
    • createRelative

      public static Directory createRelative(String path) throws IOException
      Method to create a directory relative to "java.tmpdir"
      Parameters:
      path - path
      Returns:
      a TempDir
      Throws:
      IOException - if the directory can't be created
    • createAbsolute

      public static Directory createAbsolute(String path) throws IOException
      Method to create an absolute directory
      Parameters:
      path - path
      Returns:
      a TempDir
      Throws:
      IOException - if the directory can't be created
    • create

      public static Directory create(String path, Directory.PathType pathType) throws IOException
      Method to create a temporary directory
      Parameters:
      path - path
      pathType - pathType
      Returns:
      a TempDir
      Throws:
      IOException - if the directory can't be created
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object