Class TempFile

java.lang.Object
io.vertigo.core.lang.TempFile

public final class TempFile extends Object
Temporary file management with automatic cleanup. Features: - Safe temporary file creation - Dedicated Vertigo temp directory - Automatic deletion on JVM exit - Subdirectory support - Path-based file handling Files are created in ${java.io.tmpdir}/vertigo/tempFiles
Author:
npiedeloup
  • Field Details

    • VERTIGO_TMP_DIR_PATH

      public static final Path VERTIGO_TMP_DIR_PATH
      Root directory for Vertigo temporary files. Created at startup in ${java.io.tmpdir}/vertigo/tempFiles.
  • Constructor Details

    • TempFile

      public TempFile()
  • Method Details

    • of

      public static File of(String prefix, String suffix, String subDirectory) throws IOException
      Creates a temporary file in a subdirectory.
      Parameters:
      prefix - Filename prefix, used to generate unique name
      suffix - Filename extension with dot (e.g. ".tmp")
      subDirectory - Path under temp directory (created if needed)
      Returns:
      Created temporary file
      Throws:
      IOException - if file creation fails
    • of

      public static File of(String prefix, String suffix) throws IOException
      Creates a temporary file in root temp directory.
      Parameters:
      prefix - Filename prefix, used to generate unique name
      suffix - Filename extension with dot (e.g. ".tmp")
      Returns:
      Created temporary file
      Throws:
      IOException - if file creation fails