Files
atom/Atom/Classes/FileSystemHelper.h
Nathan Sobo 80e4fda2f9 Filter out directory paths for FileFinder in Objective-C instead of JS.
Rename FileSystemHelper-contentsOfDirectoryAtPath… to -listFilesAtPath to make it clear that we're only listing files, not subdirectories. This is a fairly special purpose method but it saves us from calling back into objective-c a ton of times to filter them in JS, and makes bringing up the file finder ~2x as fast.
2012-01-04 18:22:22 -07:00

14 lines
362 B
Objective-C

#import <Foundation/Foundation.h>
#import <JavaScriptCore/JavaScriptCore.h>
#import "JSCocoa.h"
@interface FileSystemHelper : NSObject {
JSContextRef _ctx;
}
- (id)initWithJSContextRef:(JSContextRef)ctx;
- (void)listFilesAtPath:(NSString *)path recursive:(BOOL)recursive onComplete:(JSValueRefAndContextRef)jsFunction;
- (BOOL)isFile:(NSString *)path;
@end