AW: AW: AW: where do I find the temp folder on a Mac?

Mark Schonewille m.schonewille at economy-x-talk.com
Tue Nov 18 17:26:19 EST 2008


Hi Jacque, Tiemo and others,

The specialfolderpath function has changed a few times over the years  
and I can't know whether it won't change again. It is weird that  
specialfolderpath("temp") gives a result different from the tempname  
on Mac. Also, the path returned by specialfolderpath("temp") is  
different on Mac OS X 10.3 and earlier from the path returned on Mac  
OS X 10.4 and later. This is understandable, but it seems that  
Revolution is making decisions for me that I might want to make by  
myself.

SpecialFolderPath("temp") doesn't work at all on Linux, but there is a  
folder "/tmp" and the tempname works correctly. I call this a bug.

Another example, considering the preferences folder, can be found in  
my article at <http://www.runrev.com/newsletter/october/issue59/newsletter2.php 
 >. If you read that, you will understand why I often prefer to write  
my own functions instead of using specialfolderpath(). I don't always  
want to use the same folder on every platform.

There isn't necessarily a bug in Rev 3.0 with regard to the  
specialfolderpath function on Mac and Windows, but for me there are  
many cases in which I want to be in control and don't want to leave  
things to Revolution. Also, this function appeared to be quite  
unreliable in earlier versions, which means that most of my projects  
have a custom function as a substitute for the specialfolderpath  
function anyway.

Btw, my Mac OS X 10.5 system doesn't have any 50x folders in any temp  
folder in any of the temporary folders found by Revolution (but it  
does have a folder "/.TemporaryItems/folders.501"). As a result, some  
of my older stacks simply write to "/tmp/<custom folder>" which seems  
to work fine.

I hope this explains it.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Dutch forum: http://runrev.info/rrforum

Color Converter has been updated! Get it at
http://colorconverter.economy-x-talk.com !

On 18 nov 2008, at 19:42, J. Landman Gay wrote:

> Tiemo Hollmann TB wrote:
>> Hi Marc,
>> you are scaring me - often unreliable results! I am using some  
>> different
>> specialfolderpath(). Isn't this really a good practice or just a  
>> single
>> experience?
>
> I use specialFolderpath() without any problems. There was one Rev  
> release where specialFolderPath("temporary") returned incorrect  
> results on Mac OS X, but that was quickly fixed and it is safe to  
> use now. Other folders returned by specialFolderPath() have always  
> been reliable as far as I know, and I use the function all the time.
>
> Mac OS X hides certain folders because changing them can harm the  
> operating system. You can see and open these folders manually if you  
> want. Changing files in the tmp folder won't hurt anything, just  
> don't change anything else you find in there.
>
> To access one of the system's hidden folders on OS X, go to the  
> Finder. In the "Go" menu, choose "Go to folder..". Type in the full  
> path to the hidden folder you want to see. It will become visible  
> and you can open the files inside it. The folder icon will be half- 
> transparent, indicating that it is really a hidden folder. If you  
> close the finder window, the folder will hide itself again; you  
> don't need to do anything special to re-hide it. Permissions are not  
> changed.
>
> Note that the temporary folder on a Mac will vary depending on the  
> curent user. Sometimes it will be 501, sometimes 502, and so forth,  
> depending on the current user account. Using specialFolderPath() is  
> the best way to know which hidden folder is the correct one for the  
> current user files. The tempname function also returns a correct  
> location for the current user.
>
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list