Leave a Reply

42 Comments on "Objective C Programming Tutorial – 60 – Working with Files"

Notify of
avatar

Prabhakar Thapa
Guest
2 years 17 days ago

Can't I create an manager object by allocated and init why default manager. ?

Arseniy Ivanov
Guest
2 years 9 months ago

Could we do something like:

        if (![manager fileExistsAtPath:testerfile]){
            NSLog(@"File does not exist");
            return 1;
        }

My point is if fileExists returns TRUE or FALSE anyway and "if" construction checks whether expression in () returns TRUE or FALSE, what is the point to make an extra comparison of [manager fileExistsAtPath:testerfile] == NO?

Kesong Xie
Guest
3 years 11 days ago

Smart enough, even don't need a suffix for a file

grodobean
Guest
3 years 11 months ago

I don't have a debug folder on the newest version of Xcode.

Jartner123
Guest
2 years 5 months ago

+Marione Angelo Dela Cruz I AM having the same issue… did you figure it out????

Marione Angelo Dela Cruz
Guest
2 years 10 months ago

Me too, did you find it? After a year? LOL

grodobean
Guest
4 years 2 days ago

I don't see the build folder for Xcode 5.0.1

Joshua Matthews
Guest
Joshua Matthews
4 years 1 month ago

or a simpler way to add your files to your project so it can recognize it, is to:

click on your project (which is the blue file looking thing at the top of your folders in your project)

click on 'Build Phases'

Go to bottom right, click on 'add build phase'

click on 'add copy files'

click on the '+' and select the file(s) you want copied

and thats it, it is built to your project

Steven Becker
Guest
Steven Becker
4 years 2 months ago

GUYS THIS WORKS
1. create the new blank file and name it dont save it yet.
2. save it to desktop and make sure the target or whatever is the FOLDER of your project name and the box underneath that is checked.
3. save it.
4. you should see your blank file on the left somewhere…go to it
5. click the blank file in directory you r in now and drag onto the blank screen, the location shud pop up.
6. copy n paste THAT path like NSString*testerfile = @"(copy and paste what popped up)"
did it work???

steven becker
Guest
steven becker
4 years 3 months ago

wow thanks everyone ^^

Omar Peart
Guest
Omar Peart
4 years 3 months ago

For xcode users just open finder and drag the file into xcode and the directory will show just place where NSString *testerfile=@"place directory here"; and it will run sucessfully.

Ruboku
Guest
Ruboku
4 years 8 months ago

NSString *testerfile = @"/Users/username/Desktop/xcod­e projects/Bucky tutorials/working with files/testerfile

Dont forget to add the testerfile name to the end of the path

1 2 3 4
wpDiscuz