File Path Functions

Resolve a file path or create a temporary file.

These functions are exported by the KS module.

FileCreateTemp

Filename := FileCreateTemp()

Creates an empty temporary file and returns its full path.

The file is created in the system temporary directory and is not deleted automatically.

FileFullPath

FullPath := FileFullPath(Filename)

Returns the full path to Filename, resolved against A_WorkingDir when it is relative.

Examples

#Import "Ks" { FileFullPath }
Full := FileFullPath("data\items.txt")
SplitPath Full, , &Parent

Writes to a temporary file and removes it afterwards.

#Import "Ks" { FileCreateTemp }
Temp := FileCreateTemp()
try
    FileAppend "scratch data", Temp
finally
    FileDelete Temp

SplitPath, SetWorkingDir