Skip to content

Commit 2585517

Browse files
author
Sam Spencer
committed
Nixed the Hidden File Filter
To provide the utmost flexibility and usability in the project, hidden files are no longer filtered out of the returned files. If you would like to filter out hidden files, you should do so in the iCloudFilesDidChange: delegate method. Closes #59.
1 parent ef3fe3f commit 2585517

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

iCloud/iCloud.m

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,9 @@ - (void)updateFiles {
291291
}
292292

293293
if ([fileStatus isEqualToString:NSURLUbiquitousItemDownloadingStatusCurrent]) {
294-
NSNumber *aBool = nil;
295-
296-
// Exclude hidden files
297-
[fileURL getResourceValue:&aBool forKey:NSURLIsHiddenKey error:nil];
298-
if (aBool && ![aBool boolValue]) {
299-
// Add the file metadata and file names to arrays
300-
[discoveredFiles addObject:result];
301-
[names addObject:[result valueForAttribute:NSMetadataItemFSNameKey]];
302-
}
294+
// Add the file metadata and file names to arrays
295+
[discoveredFiles addObject:result];
296+
[names addObject:[result valueForAttribute:NSMetadataItemFSNameKey]];
303297

304298
if (self.query.resultCount-1 >= idx) {
305299
// Notify the delegate of the results on the main thread
@@ -333,11 +327,7 @@ - (void)updateFiles {
333327
// Gather the query results
334328
for (NSMetadataItem *result in queryResults) {
335329
NSURL *fileURL = [result valueForAttribute:NSMetadataItemURLKey];
336-
NSNumber *aBool = nil;
337-
338-
// Don't include hidden files
339-
[fileURL getResourceValue:&aBool forKey:NSURLIsHiddenKey error:nil];
340-
if (aBool && ![aBool boolValue]) [discoveredFiles addObject:result];
330+
[discoveredFiles addObject:result];
341331
}
342332

343333
// Get file names in from the query

0 commit comments

Comments
 (0)