is it safe to hardwire the "downloads" folder?
ambassador at fourthworld.com
Mon Nov 18 08:38:13 EST 2013
Tiemo Hollmann wrote:
> I am looking for the best folder to download updates for my program on win
> and mac.
The good news is that the friendly constants LiveCode provides for
access to special folders is only a subset of the most commonly-used
ones. Ken Ray took the time to document many others that can be used on
both OS X and Windows:
The bad news is that I don't see the Downloads folder among them, nor
could I turn it up in Apple's docs.
It may be that no constant for Downloads was defined for the Carbon API,
so it wouldn't be accessible to us until that part of the LC engine is
updated for Cocoa.
Or it may be that it's simply documented in a place I couldn't find. :)
If you can find it, use it. If not, I'd probably opt for a different
folder just to be save.
If this is a file you want the user to interact with, then you may want
to risk hard-wiring "Downloads", or use the Desktop folder.
If it's only for your app to draw from to update itself, most
self-updating apps use a temp folder, which may be a good idea here
since tmp gets cleaned by the system between sessions in case anything
goes wrong and your app doesn't have a chance to clean up after itself.
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
Follow me on Twitter: http://twitter.com/FourthWorldSys
More information about the Use-livecode