• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: File creation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File creation


  • Subject: Re: File creation
  • From: Charilaos Skiadas <email@hidden>
  • Date: Sun, 27 Mar 2005 19:59:10 -0600

Oops, forgot to cc the list.

Begin forwarded message:

From: Charilaos Skiadas <email@hidden>
Date: March 27, 2005 7:57:50 PM CST
To: Julien Palmas <email@hidden>
Subject: Re: File creation

How about [[NSFileManager defaultManager] createFileAtPath:@"emptyfile.ccc" contents:nil attributes:nil] ?
Not sure what it would do with nil contents, but maybe it would create an empty file? Definitely worth a look at least.
Not sure what it would do if the file already exists either.
But if this doesn't work, you could just set up a little NSTask.


On Mar 27, 2005, at 7:39 PM, Julien Palmas wrote:

I am using a library that is not really complete in terms of file handling and that can only update an existing file, not create a new one.

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.

Is there any simple way to create such a file with Obj-C or C ?

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


Haris


Haris

_______________________________________________
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


  • Follow-Ups:
    • Re: File creation
      • From: Ondra Cada <email@hidden>
  • Prev by Date: NSDocument data-based primitives
  • Next by Date: Re: File creation
  • Previous by thread: Re: File creation
  • Next by thread: Re: File creation
  • Index(es):
    • Date
    • Thread