Browse files

Extract -indexResultAtPath: method.

  • Loading branch information...
1 parent 8f5518f commit 0047880aefee30f785291f4047e42c2212de58e3 @mkhl committed Sep 24, 2009
Showing with 9 additions and 8 deletions.
  1. +9 −8 FinderSidebarSource.m
View
17 FinderSidebarSource.m
@@ -53,19 +53,20 @@ - (void)recacheContentsAfterDelay:(NSTimeInterval)delay
afterDelay:delay];
}
-- (void)indexItemAtPath:(NSString *)path
+- (void)indexResultAtPath:(NSString *)path
{
[self indexResult:[HGSResult resultWithFilePath:path
source:self
attributes:nil]];
+}
+
+- (void)indexItemAtPath:(NSString *)path
+{
+ [self indexResultAtPath:path];
NSFileManager *manager = [NSFileManager defaultManager];
- for (NSString *subpath in [manager directoryContentsAtPath:path]) {
- if ([subpath hasPrefix:@"."]) continue;
- subpath = [path stringByAppendingPathComponent:subpath];
- [self indexResult:[HGSResult resultWithFilePath:subpath
- source:self
- attributes:nil]];
- }
+ for (NSString *subpath in [manager directoryContentsAtPath:path])
+ if (![subpath hasPrefix:@"."])
+ [self indexResultAtPath:[path stringByAppendingPathComponent:subpath]];
}
@end

0 comments on commit 0047880

Please sign in to comment.