NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,
YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *writableDBPath = [documentsDirectory stringByAppendingPathComponent:filename];
#define ABS_FILE_PATH(FILE_NAME) [NSString stringWithFormat:@"%@/Documents/%@",
NSHomeDirectory(),FILE_NAME]
//獲取程序application package目錄下的文件路徑:
#define PACKAGE_FILE_PATH(FILE_NAME) [[[NSBundle mainBundle] resourcePath]
stringByAppendingPathComponent:FILE_NAME]
NSString* filePath = [[NSBundle mainBundle] pathForResource:@"fileName" ofType:@"fileType
(txt...html..)"];