Class ApplicationTemp

java.lang.Object
org.springframework.boot.system.ApplicationTemp

public class ApplicationTemp extends Object
Provides access to an application specific temporary directory. Generally speaking different Spring Boot applications will get different locations, however, simply restarting an application will give the same location.
Since:
2.0.0
Author:
Phillip Webb
  • Constructor Details

    • ApplicationTemp

      public ApplicationTemp()
      Create a new ApplicationTemp instance.
    • ApplicationTemp

      public ApplicationTemp(Class<?> sourceClass)
      Create a new ApplicationTemp instance for the specified source class.
      Parameters:
      sourceClass - the source class or null
  • Method Details

    • toString

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

      public File getDir()
      Return the directory to be used for application specific temp files.
      Returns:
      the application temp directory
    • getDir

      public File getDir(String subDir)
      Return a subdirectory of the application temp.
      Parameters:
      subDir - the subdirectory name
      Returns:
      a subdirectory