Re: File creation
Re: File creation
- Subject: Re: File creation
- From: Ondra Cada <email@hidden>
- Date: Mon, 28 Mar 2005 04:07:53 +0200
Oh, a propos:
On 28.3.2005, at 3:59, Charilaos Skiadas wrote:
To implement a save as ... function in my application, i would like
to cheat the library creating an empty file just like I would do
with a "touch emptyfile.ccc" in the terminal.
How about [[NSFileManager defaultManager]
createFileAtPath:@"emptyfile.ccc" contents:nil attributes:nil] ?
Do always in Cocoa apps use absolute paths (if needed, generated
programmatically using NSBundle or FSFindFolder or so). When using
relative ones, you'll bump into diverse problems which I haven't time
at the moment to list :)
But if this doesn't work, you could just set up a little NSTask.
Although it definitely is possible, in this case it seems to be just a
slight overkill :)
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden