Revlet default folder

J. Landman Gay jacque at hyperactivesw.com
Sat Aug 1 12:55:40 EDT 2009


Kevin Stallibrass wrote:
> I feel that a better place for the default folder is the
> temporary internet files folder so that when this folder is emptied via the
> web browser, my files will be removed at the same time.
> 
> Trouble is, I've no idea of a global path I could use which would work on
> all supported browsers/OS's  - is there one?

Forgot to answer this. The Rev function specialFolderPath("temporary") 
will return what you want in both standalones and Revlets. On OS X it is:

	/Users/<user>/Library/Caches/TemporaryItems

On Windows XP:

	C:/Documents and Settings/<user>/Local Settings/Temp

Or if you want a file name rather than a folder, use the tempName() 
function. It returns a path and a guaranteed unique file name for a 
temporary file. The actual file name will vary depending on the OS, the 
files already in the temp folder, and some other things, but it will 
always point to the OS-approved location with a unique name tacked on. 
On my machine, in OS X, I get:

/private/var/folders/lK/lKqfANrEKa6m7q-jKrtU++TI/TemporaryItems/tmp0

And on WinXP:

C:/Documents and Settings/<user>/Local Settings/Temp/tmp2

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list