is it safe to hardwire the "downloads" folder?

Roger Eller roger.e.eller at sealedair.com
Mon Nov 18 09:43:14 EST 2013


Since it varies a little between versions of Windows, you can list them all.

   put 0 into t
   repeat for 60
      put t & tab & specialFolderPath(t) & cr after fld 1
      add 1 to t
   end repeat

It looks like you will just have to append "/downloads" to
specialFolderPath(40)... or the users home folder.

~Roger

On Mon, Nov 18, 2013 at 8:38 AM, Richard Gaskin
<ambassador at fourthworld.com>wrote:

> 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:
> <http://www.sonsothunder.com/devres/livecode/tips/file010.htm>
>
> 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.
>
> --
>  Richard Gaskin
>  Fourth World
>  LiveCode training and consulting: http://www.fourthworld.com
>  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
>  Follow me on Twitter:  http://twitter.com/FourthWorldSys
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list