mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Remove $native.makeDirectory()
This commit is contained in:
@@ -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]);
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user