Class TempDirectory

java.lang.Object
org.robolectric.util.TempDirectory

public class TempDirectory extends Object
A helper class for working with temporary directories. All temporary directories created by this class are automatically removed in a JVM shutdown hook.
  • Constructor Details

    • TempDirectory

      public TempDirectory()
    • TempDirectory

      public TempDirectory(String name)
  • Method Details

    • getBasePath

      public Path getBasePath()
    • createFile

      public Path createFile(String name, String contents)
    • create

      public Path create(String name)
    • createIfNotExists

      public Path createIfNotExists(String name)
    • destroy

      public void destroy()