Closed sogaiu closed 4 months ago
Not making much progress getting info about the MinGW and Cygwin cases and may be it wouldn't be bad to get some more experience using the existing code so I'm going to close this for now.
On a related note, @yumaikas has a library called janet-tempfiles that has some intersecting functionality.
This is an attempt to address #189 including some tests.
There are four functions:
make-temp-dir
temp-root
windows-temp-root
posix-temp-root
make-temp-dir
tries to create a temporary directory that lives under some temporary directory that a system already has (the functiontemp-root
tries to determine this) and tries to do so according to a template.windows-temp-root
andposix-temp-root
are supporting functions for thetemp-root
function.See the docstring of each for details.
I'm not certain what
temp-root
should return for MinGW and Cygwin setups. For the moment I've gone with/tmp
for both. If someone happens to know or can check, I'm happy to modify. Otherwise, may be if these are wrong, they can get corrected later (^^;