Re: Finding user's Music folder (and others)?

2009-09-18 Thread Jens Alfke
On Sep 17, 2009, at 9:32 PM, Graham Cox wrote: It's also pretty common to relocate it - don't assume it's unusual. Quite a few people like to keep their music on an external drive so whatever it is you're doing, if you assume ~/Music/, it'll fail in those cases, as you realise. Yes!

Finding user's Music folder (and others)?

2009-09-17 Thread Rick Mann
I need to find the iTunes Music Library.xml file, which I know to be in the iTunes music folder under the iTunes directory. Is there an API call to get the user's Music folder? I realize iTunes allows you to specify another location for the music folder, so perhaps I need to ask iTunes for

Re: SOLVED Finding user's Music folder (and others)?

2009-09-17 Thread Rick Mann
Sigh, sorry. I looked at NSSearchPathForDirectoriesInDomains() and dismissed it without looking more closely. That's what I needed. Sorry for the noise. On Sep 17, 2009, at 18:52:28, Rick Mann wrote: I need to find the iTunes Music Library.xml file, which I know to be in the iTunes music

Re: Finding user's Music folder (and others)?

2009-09-17 Thread Rick Mann
Hmm. I take it back. I can't get code calling NSSearchPathForDirectoriesInDomains() to compile. NSArray* paths = NSSearchPathForDirectoriesInDomains (NSMusicDirectory, NSUserDomainMask, false); error: 'NSMusicDirectory' was not declared in this scope What do I need to do to get

Re: Finding user's Music folder (and others)?

2009-09-17 Thread Michael Babin
On Sep 17, 2009, at 10:03 PM, Rick Mann wrote: Hmm. I take it back. I can't get code calling NSSearchPathForDirectoriesInDomains() to compile. NSArray* paths = NSSearchPathForDirectoriesInDomains (NSMusicDirectory, NSUserDomainMask, false); error: 'NSMusicDirectory' was not declared in

Re: Finding user's Music folder (and others)?

2009-09-17 Thread Rick Mann
On Sep 17, 2009, at 20:15:43, Michael Babin wrote: On Sep 17, 2009, at 10:03 PM, Rick Mann wrote: Hmm. I take it back. I can't get code calling NSSearchPathForDirectoriesInDomains() to compile. NSArray* paths = NSSearchPathForDirectoriesInDomains (NSMusicDirectory, NSUserDomainMask,

Re: Finding user's Music folder (and others)?

2009-09-17 Thread Steve Christensen
On Sep 17, 2009, at 8:18 PM, Rick Mann wrote: On Sep 17, 2009, at 20:15:43, Michael Babin wrote: On Sep 17, 2009, at 10:03 PM, Rick Mann wrote: Hmm. I take it back. I can't get code calling NSSearchPathForDirectoriesInDomains() to compile. NSArray* paths =

Re: Finding user's Music folder (and others)?

2009-09-17 Thread Graham Cox
On 18/09/2009, at 11:52 AM, Rick Mann wrote: I realize iTunes allows you to specify another location for the music folder, so perhaps I need to ask iTunes for it directly, but for the time being finding the Music folder is a good start. It's also pretty common to relocate it - don't

Re: Finding user's Music folder (and others)?

2009-09-17 Thread Rick Mann
For sure, and we will be. I suspect one can ask iTunes via an AppleEvent, but looking at the prefs is not a bad suggestion. I just needed a reasonable solution that was easy to get to in the meantime. Thanks. On Sep 17, 2009, at 21:32:00, Graham Cox wrote: On 18/09/2009, at 11:52 AM,