Special.Folder.Downloads ?

There does not seems to be a Special.Folder.Downloads ?
Although this is one of the sandbox entitlements folders. So imo it should be added to the framework.

Creating a folder with: /Users//Downloads/ does not work when your app is sandboxed.

Any clues?

[quote=219303:@Christoph De Vocht]There does not seems to be a Special.Folder.Downloads ?
Although this is one of the sandbox entitlements folders. So imo it should be added to the framework.

Creating a folder with: /Users//Downloads/ does not work when your app is sandboxed.

Any clues?[/quote]

Why are you accessing through a fixed path ?

SpecialFolder.UserHome.Child("Downloads")

Would seem more reliable.

For some reason this does not work when sandboxing. Odd … will do some more tests.

Is it possible that sandboxes apps are not allowed to access the Downloads folder? That certainly seems reasonable to me.

No, there is an official entitlement for the Downloads folder (as with Pictures, Music and Movies). Those 4 are allowed for sandboxing.

I just created a small test app that reads a text file and displays it in a TextArea which uses SpecialFolder.UserHome.Child("Downloads"), then wrapped it with App Wrapper making sure that Downloads are allowed. No problem.

[quote=219303:@Christoph De Vocht]There does not seems to be a Special.Folder.Downloads ?
[/quote]

You can use this on OS X:

[code]Function DownloadsFolder() As FolderItem
Const kUserDomain = -32763
Const kDownloadsFolderType = “down”

Return SpecialFolder.GetFromDomainAndCode(kUserDomain, kDownloadsFolderType)
End Function[/code]

Wouldn’t it be possible to add the Downloads folder to the SpecialFolder?

Feature request, but good luck. I created a module for other special folder locations Xojo inc doesn’t care to include.
http://timi.me/xojo

Yes, that would seem to make sense and every supported system has one these days (more or less). You should file a feature request for it.

<https://xojo.com/issue/41113>

[quote=219454:@Tim Parnell]Feature request, but good luck. I created a module for other special folder locations Xojo inc doesn’t care to include.
http://timi.me/xojo[/quote]
dont see a FR about adding these

#41113

I meant from tim prior to 41113 being filed :stuck_out_tongue:
Tim mentioned his module that added several others but I cant find an FR to add what his module has anywhere
Nothing under his name nor one that include specialfolder in the text

Oops! Using my iPhone. Should have scrolled up. :wink:

I have found that the workaround using SpecialFolder.GetFromDomainandCode is broken on 2019r2. Returns ~/Library instead of ~/Downloads. Filed #58177