Remove $native.makeDirectory()

This commit is contained in:
Kevin Sawicki
2013-03-07 18:02:55 -08:00
parent e7050b2083
commit 6abf1ff1aa
2 changed files with 2 additions and 14 deletions

View File

@@ -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]);

View File

@@ -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.