[squeak-dev] path for volatile files

Keith Hodges keith_hodges at yahoo.co.uk
Wed May 28 15:12:14 UTC 2008


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.






More information about the Squeak-dev mailing list