help-gnustep
[Top][All Lists]
Advanced

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

Re: GSFileHandle, initForWritingAtPath, and O_CREAT


From: Richard Frith-Macdonald
Subject: Re: GSFileHandle, initForWritingAtPath, and O_CREAT
Date: Sat, 2 Aug 2003 06:24:31 +0100


On Saturday, August 2, 2003, at 02:29 AM, Dan Hitt wrote:

Hi All,

I notice that in the initForWritingAtPath: method of GSFileHandle,
O_CREAT is not among the flags passed to open.  So, consequently,
if you try to open a non-existent file with code like
GSFileHandle * my_handle=[[GSFileHandle alloc] initForWritingAtPath:path];
it won't work.

So, i presume this means that this is not the best way to
deal with opening (and writing to) files?

Thanks in advance for any advice on a better way to open a non-existent
file for writing.

NSFileHandle doen't have a mechanism to create files ... for that you use NSFileManager.





reply via email to

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