discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: User's GNUstep directory


From: Richard Frith-Macdonald
Subject: Re: User's GNUstep directory
Date: Fri, 18 Sep 2009 16:20:36 +0100


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"];




reply via email to

[Prev in Thread] Current Thread [Next in Thread]