|Nov 20, 2009, 07:15 AM||#1|
Making a log file in Xcode Application
I am trying to make log file in for my application now when the program starts i need the file to deleted if it exits and appened in many times in the program how to solve this i FSCreateFileUnicode this but its not working.
any help would be appreciated thanks
|Nov 20, 2009, 02:55 PM||#3|
|Nov 23, 2009, 12:14 AM||#4|
|Nov 23, 2009, 12:52 AM||#5|
That doesn't make sense.
If the file exists, then there's no need to create it. Simply open it for writing and append your data.
If the file doesn't exist, then create it before opening it.
There are functions for opening existing files for writing. Read the FileManager docs. Look for FSOpenFork.
You can also use the C standard I/O function fopen(), and it will handle creation, appending, etc. when given the right parameters.
Last edited by chown33; Nov 23, 2009 at 12:59 AM.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Create finished application? Xcode 5?||mark79658||Mac Programming||1||Mar 17, 2014 06:49 AM|
|making backspace button on Xcode||abcdefg12345||Mac Programming||3||Oct 15, 2013 09:31 PM|
|Console.log file in HD?||kmpoboy2||OS X 10.8 Mountain Lion||4||Jan 20, 2013 03:55 PM|
|Making AI or PDF file from any GIMP file extensions without loss of quality?||twiggy0||Design and Graphics||6||Aug 30, 2012 12:25 AM|
|Making a package of all the application||MitsakiM||Mac Programming||0||Jul 8, 2012 01:31 PM|
All times are GMT -5. The time now is 11:07 PM.