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

- if there's a better way (not harcoded) to get this directory,
something like [NSApp libraryPath] ?

Any hint ?

Something like ...

path = [[NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent: @"SimpleAgenda"];

or probably better ...

path = [[NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent: @"SimpleAgenda"];


_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to