How to access the default music folder with filesystem?
-
What’s the proper way to do this? There is a Documents wildcard, which is great. How do I go to Music from there on each OS? It’s one folder back from the Documents.
Also - what’s the best non system-locked location for samples on the internal drive? I would assume the Documents folder to be fine but for some people, it’s permanently synced to the cloud, which isn’t optimal.
Also 2 - what if the username of the person using the samples contains dots or other bad characters?
Thank you!
-
@tomekslesicki I don't think you can rely on a Music folder existing. But I'd start at the user's home folder and call createDirectory to get to the Music folder.
I always let the user select where they want to install the samples. For a default location though you could put them in a sub-folder inside documents or downloads.
-
@d-healey said in How to access the default music folder with filesystem?:
I don't think you can rely on a Music folder existing
Sure, in fact that's one of the only "sandbox-safe" locations for music apps on macOS (eg. GarageBand can only access the sample content from there).
I'm using this as default location for all my sample-based plugins on macOS.
-
@Christoph-Hart Oh that's good to know, but what about on Windows, is it undeletable by the user?
-
@d-healey just tried to delete it. Didn't work.
-
FIY, I added a
FileSystem.Music
constant which brings you directly to the folder. -
@Christoph-Hart fantastic, thank you!