mkTempFile : Result FileError Path with FileWrite
Create a fresh, empty temporary file and return its path. The caller is responsible for removing it — prefer withTempFile, which always cleans up.
import System.TempmkTempFile : Result FileError Path with FileWrite
Create a fresh, empty temporary file and return its path. The caller is responsible for removing it — prefer withTempFile, which always cleans up.
mkTempDir : Result FileError Path with FileWrite
Create a fresh temporary directory and return its path. The caller removes it — prefer withTempDir.
withTempFile : (Path -> a with FileSystem) -> Result FileError a with FileSystem
Create a temp file, run use with its path, and ALWAYS remove it afterwards — bracket runs the cleanup on every exit. The callback may do any FileSystem work.
withTempDir : (Path -> a with FileSystem) -> Result FileError a with FileSystem
Create a temp directory, run use with its path, and ALWAYS remove it (and everything inside it) afterwards.