mirror of
https://github.com/0x5eal/terracotta.git
synced 2024-12-12 12:50:35 +00:00
12 lines
321 B
Lua
12 lines
321 B
Lua
|
local Process = require("@lune/process")
|
||
|
|
||
|
local Utils = {}
|
||
|
|
||
|
-- Utility function to create a temporary directory quickly
|
||
|
function Utils.MakeTemp(): (boolean, string)
|
||
|
local filePathChild = Process.spawn("mktemp")
|
||
|
|
||
|
return filePathChild.ok, (filePathChild.ok and filePathChild.stdout:gsub("%s", "")) or ""
|
||
|
end
|
||
|
|
||
|
return Utils
|