WebTau Guide
Continuous Integration
Reference
light
Temporary Files Dirs
Wed Jun 12 2024

Temporary Dirs

create temp directory
def dir = fs.tempDir("my-dir-prefix")
def path = dir.resolve("my-file")
fs.writeText(path, "hello world")
create temp directory inside directory
def parentDir = fs.tempDir("my-dir-prefix")
def dir = fs.tempDir(parentDir, "nested-temp-dir")

Temporary Files

create temp file
def file = fs.tempFile("my-file-prefix", ".txt")
fs.writeText(file, "hello world")
create temp file inside a directory
def dir = fs.tempDir("temp-dir-prefix")
def file = fs.tempFile(dir, "my-file-prefix", ".txt")
example of temp file location
/tmp/temp-dir-prefix5335268953361909206/my-file-prefix18238288925415767834.txt

Automatic Deletion

Note:temp files and temp directories will be automatically deleted at the end of run