Iphone moveItemAtPath可以在iPad上运行,但不能在模拟器上运行?

Iphone moveItemAtPath可以在iPad上运行,但不能在模拟器上运行?,iphone,ipad,ios-simulator,Iphone,Ipad,Ios Simulator,我正在使用moveItemAtPath调用将文件扩展名从.PDF更改为.PDF(只是将其小写)。它在模拟器上失败,如下所示,但在设备上工作正常。这可能是某种权限问题吗 lowerPDF=[upperPDF stringByReplacingOccurrencesOfString:@".PDF" withString:@".pdf"]; NSLog(@"Lowercasing filename %@ to %@",upperPDF,lowerPDF); if (![fm moveItemAtPat

我正在使用moveItemAtPath调用将文件扩展名从.PDF更改为.PDF(只是将其小写)。它在模拟器上失败,如下所示,但在设备上工作正常。这可能是某种权限问题吗

lowerPDF=[upperPDF stringByReplacingOccurrencesOfString:@".PDF" withString:@".pdf"];
NSLog(@"Lowercasing filename %@ to %@",upperPDF,lowerPDF);
if (![fm moveItemAtPath:upperPDF toPath:lowerPDF error:&error]) 
    NSLog(@"RENAME error %@",[error localizedDescription]);

NextPage[13625:207] Lowercasing filename /Users/scott/Library/Application Support/iPhone Simulator/4.2/Applications/7D38A00A-3990-441C-96C5-DD56EC3B6922/Documents/What a Difference a Day made 24010812.PDF to /Users/scott/Library/Application Support/iPhone Simulator/4.2/Applications/7D38A00A-3990-441C-96C5-DD56EC3B6922/Documents/What a Difference a Day made 24010812.pdf
NextPage[13625:207] RENAME error The operation couldn’t be completed. (Cocoa error 512.)
谢谢


//Scott

Mac上的文件系统通常不区分大小写,而设备上的文件系统区分大小写。因此,在设备上,“foo.PDF”和“foo.PDF”是两个不同的文件,而在模拟器使用的Mac文件系统上,它们是相同的。

Mac上的文件系统通常不区分大小写,而设备上的文件系统区分大小写。因此,在设备上,“foo.PDF”和“foo.PDF”是两个不同的文件,而在模拟器使用的Mac文件系统上,它们是相同的。

你是一个极快的失范者!谢谢你,你真是个速度极快的失范者!非常感谢。