December 2013
Beginner
576 pages
16h 4m
English
NSPathUtilities.h includes functions and category extensions to NSString to enable you to manipulate pathnames. You should use these whenever possible to make your program more independent of the structure of the file system and locations of particular files and directories. Program 16.5 shows how to use several of the functions and methods provided by NSPathUtilities.h.
Program 16.5
// Some basic path operations#import <Foundation/Foundation.h>int main (int argc, char * argv[]){ @autoreleasepool { NSString *fName = @"path.m"; NSFileManager *fm; NSString *path, *tempdir, *extension, *homedir, *fullpath; NSArray *components; ...
Read now
Unlock full access