ãã使ãããã ãã©ãã¶ãæ¯åå¿ããã®ã§ãsnippetã¡ã¢ã
// ããã¥ã¡ã³ããã©ã«ãã®ãã¹æååãåå¾ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *aDirectory = [paths objectAtIndex:0]; NSError* error; // zipãã¡ã¤ã«ãåæãã¦ã¿ã NSString* suffix = @".zip"; // ãã¡ã¤ã«ããã¼ã¸ã£ã¯ã©ã¹ãåå¾ NSFileManager *fileManager = [NSFileManager defaultManager]; // ããã¥ã¡ã³ããã£ã¬ã¯ããªç´ä¸ã®.zipã§çµãããã¡ã¤ã«åã®ãã¡ã¤ã«ãåæ for (NSString* path in [fileManager contentsOfDirectoryAtPath:aDirectory error:&error]){ NSDictionary*attrs = [fileManager attributesOfItemAtPath:path error:&error]; // ã¬ã®ã¥ã©ã¼ãã¡ã¤ã«ã§ä¸ã¤.zipã§çµãããã® if( [NSFileTypeRegular compare:[attrs objectForKey:NSFileType] ] && [path hasSuffix:suffix]){ // ãã¡ã¤ã«åã ããªã®ã§ããã£ã¬ã¯ããªã¸ã®ãã¹ã«ã¢ãã³ã NSString* fullPath = [documentsDirectory stringByAppendingPathComponent:path]; /*do somthing to fullPath*/ } }