From 6abf1ff1aade7cc9d37039161003f8c42c4ab48c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 7 Mar 2013 18:02:55 -0800 Subject: [PATCH] Remove $native.makeDirectory() --- native/v8_extensions/native.mm | 14 +------------- src/stdlib/fs.coffee | 2 +- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/native/v8_extensions/native.mm b/native/v8_extensions/native.mm index 13c29f5cd..c566ce386 100644 --- a/native/v8_extensions/native.mm +++ b/native/v8_extensions/native.mm @@ -26,7 +26,7 @@ namespace v8_extensions { const char* methodNames[] = { "read", "write", "absolute", "remove", "writeToPasteboard", "readFromPasteboard", "quit", "watchPath", "unwatchPath", - "getWatchedPaths", "unwatchAllPaths", "makeDirectory", "move", "moveToTrash", "reload", + "getWatchedPaths", "unwatchAllPaths", "move", "moveToTrash", "reload", "md5ForPath", "getPlatform", "setWindowState", "getWindowState", "isMisspelled", "getCorrectionsForMisspelling" }; @@ -201,18 +201,6 @@ namespace v8_extensions { [pathWatcher unwatchAllPaths]; return true; } - else if (name == "makeDirectory") { - NSString *path = stringFromCefV8Value(arguments[0]); - NSFileManager *fm = [NSFileManager defaultManager]; - NSError *error = nil; - [fm createDirectoryAtPath:path withIntermediateDirectories:NO attributes:nil error:&error]; - - if (error) { - exception = [[error localizedDescription] UTF8String]; - } - - return true; - } else if (name == "move") { NSString *sourcePath = stringFromCefV8Value(arguments[0]); NSString *targetPath = stringFromCefV8Value(arguments[1]); diff --git a/src/stdlib/fs.coffee b/src/stdlib/fs.coffee index 3dee17bac..08bd7fcc8 100644 --- a/src/stdlib/fs.coffee +++ b/src/stdlib/fs.coffee @@ -105,7 +105,7 @@ module.exports = $native.write(path, content) makeDirectory: (path) -> - $native.makeDirectory(path) + nodeFs.mkdirSync(path) # Creates the directory specified by "path" including any missing parent # directories.