Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Khanjan

macrumors newbie
Original poster
Jun 25, 2009
14
0
Hey all,

I am building an interface for running some perl scripts. I want to display a file on the hard drive in the interface and update it on mouse click. I am able to display the file, however, I am not able to update it. I am new to Objective C. Can anyone please help me on how to update a file using Objective C ?

Thanks,
Khanjan
 
You might need to be more specific. There are methods to grab a file with an NSData wrapper, or get a text file using NSString:
http://developer.apple.com/document...le_ref/occ/clm/NSData/dataWithContentsOfFile:
http://developer.apple.com/document...ring/stringWithContentsOfFile:encoding:error:

And corresponding methods to write the contents of an NSData object or NSString to a file:
http://developer.apple.com/document..._ref/occ/instm/NSData/writeToFile:atomically:
http://developer.apple.com/document...String/writeToFile:atomically:encoding:error:

Does this help?

-Lee
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.