获取DocumentDirectory目录报错为什么会报错expected identifier
ringa_lee
Because your grammar is wrong.
NSArray *docs = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
or
NSString *path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES) objectAtIndex:0];
NSSearchPathForDirectoriesInDomains is a C function, not a method of a certain OC class, so the outermost square brackets are not needed.
Because your grammar is wrong.
or
NSSearchPathForDirectoriesInDomains is a C function, not a method of a certain OC class, so the outermost square brackets are not needed.