Le vendredi 18 septembre 2009 à 16:15 +0100, David Chisnall a écrit :
> On 18 Sep 2009, at 16:03, Philippe Roussel wrote:
>
> > Hi all,
> >
> > Currently I'm using the hardcoded path @"~/GNUstep/Library/
> > SimpleAgenda"
> > to save the local calendars users create in SimpleAgenda (if I
> > create a
> > local agenda called 'private', it will be saved in the file
> > ~/GNUstep/Library/SimpleAgenda/private).
> >
> > I am wondering if :
> >
> > - it's a good place to save user data
>
> Yes, it's a good place. Apple tends to favour putting things in
> Library/Application Support/{AppName} but Library/{AppName} is also
> fine.
Great.
> > - if there's a better way (not harcoded) to get this directory,
> > something like [NSApp libraryPath] ?
>
> You want to call:
>
> NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
> NSUserDomainMask, YES);
>
> This should contain a one-entry NSArray instance containing (the tilde-
> expanded form of) ~/GNUstep/Library. Then use -
> stringByAppendingPathComponent: to add the 'private' bit.
Cool, just what I needed.
David and Richard, thanks a lot for your answers. GNUstep community
might not be enormous but it's always really helpful and friendly,
thanks to you and a few others. I really appreciate it.
Philippe
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep