Hi,
How can I access a 'temporary directory' in Squeak? When I run Squeak from USB flash memory, I don't want temporary files created in the (FileDirectory default) folder. I wanted a VM-unique volatile path where I can create temporary files. e.g. /tmp/squeakvm-$VMPID/ (Unix) C:\WINDOWS\TEMP (Windows)
Do I hack FileDirectory to create a unique temp directory on startup and clean the cruft on quit. Is there a better way?
Thanks in advance, Subbu
K. K. Subramaniam wrote:
Hi,
How can I access a 'temporary directory' in Squeak? When I run Squeak from USB flash memory, I don't want temporary files created in the (FileDirectory default) folder. I wanted a VM-unique volatile path where I can create temporary files. e.g. /tmp/squeakvm-$VMPID/ (Unix) C:\WINDOWS\TEMP (Windows)
Do I hack FileDirectory to create a unique temp directory on startup and clean the cruft on quit. Is there a better way?
Thanks in advance, Subbu
Check out Rio as a replacement for FileDirectory, it has:
"To create a new temp directory"
tmp := Rio mkTmpDir
"To clean up everything."
tmp all rmdir.
best regards
Keith
p.s. It doesnt have a clean up on exit, and I havent tested the windows variant on windows.
squeak-dev@lists.squeakfoundation.org