1

I use theses function to read out the directory content of my app iCloud folder :

+(NSArray *)getiCloudFileList:(NSString *)icloudPath strMask:(NSString *)strMask {
     NSError *error;
     NSFileManager *fileManager = [[NSFileManager alloc] init];

     NSArray *directoryContent = [fileManager contentsOfDirectoryAtPath:icloudPath error:&error];

     NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF like[cd] %@", strMask];

     return [directoryContent filteredArrayUsingPredicate:predicate];
} 

This function works fine if the app creates the files. If I copy a file with the Mac OS X Finder into the app folder, for example test1.txt in the directoryContent Array I get the result .test1.txt.icloud.

Gives there another way to get the directory content of an app iCloud folder without the .icloud extension or how can I copy files to an app iCloud folder without the .icloud extension ?

Rolf Warnecke
  • 107
  • 1
  • 10
  • 1
    Did you ever figure this out? I am having the same issue and can't find a solution. – gbotha Dec 12 '15 at 16:50
  • related: [How do I verify a file's existence in iCloud?](http://stackoverflow.com/q/21094534/1699210) – bummi Dec 13 '15 at 07:50

0 Answers0