gnustep-dev
[Top][All Lists]
Advanced

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

Re: NSSearchPathForDirectoriesInDomains and non-existing directories


From: David Ayers
Subject: Re: NSSearchPathForDirectoriesInDomains and non-existing directories
Date: Tue, 25 Oct 2005 17:01:37 +0200
User-agent: Mozilla Thunderbird 1.0.2 (X11/20051002)

Richard Frith-Macdonald schrieb:
> On 2005-10-25 09:14:04 +0100 David Ayers <address@hidden> wrote:
> 
>> 2.) creating the expected user directory layout, and creating it "in
>> time" for such usage as 1.) which I believe implies:
>>   a.) We created it when sourcing GNUstep.[csh] (just kidding :-) )
>>   b.) Creating the directory layout in +[NSObject initialize] or
>>   c.) auditing core for NSSearchPath usage and calling an "internal"
>> function/macro to create them just before the relevant invocations.
> 
> 
> Perhaps there is a reason why directories don't exist ... so NSColorList
> should recognize that the directory does not exist, and return NO.
> What about if the directory exists but is not writable? ... NSColorList
> needs to cope with that case too.  So, since code generally needs to be
> able to deal with error conditions, I'm not sure there is a compelling
> aregument to say we should force directories to exist by creating them.

Absolutely agreed...

> That being said, I can see how useful automatically creating directories
> could be, and we could make the behavior configurable.  If we are going
> to do that, the obvious point to do it is when path lookups are
> initialised (NSPathUtilities.m)

Maybe I wasn't clear enough, but indeed I meant the initial creation for
a user who is starting her first gnustep process/app (independent of the
NSColorList issue).

How should the expected layout be created?  An explicit program he needs
to execute (see 2.a. above ;-) ) or implicitly which means each process
needs to check if it needs to create them.  But, yes, NSPathUtilities
initialization is a lot better that +[NSObject initialize].

Cheers,
David




reply via email to

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