Remove $native.move()

This commit is contained in:
Kevin Sawicki
2013-03-07 18:24:11 -08:00
parent d55e1bfb67
commit d91c540d47
2 changed files with 2 additions and 16 deletions

View File

@@ -26,7 +26,7 @@ namespace v8_extensions {
const char* methodNames[] = {
"absolute",
"remove", "writeToPasteboard", "readFromPasteboard", "quit", "watchPath", "unwatchPath",
"getWatchedPaths", "unwatchAllPaths", "move", "moveToTrash", "reload",
"getWatchedPaths", "unwatchAllPaths", "moveToTrash", "reload",
"md5ForPath", "getPlatform", "setWindowState", "getWindowState", "isMisspelled",
"getCorrectionsForMisspelling"
};
@@ -154,20 +154,6 @@ namespace v8_extensions {
[pathWatcher unwatchAllPaths];
return true;
}
else if (name == "move") {
NSString *sourcePath = stringFromCefV8Value(arguments[0]);
NSString *targetPath = stringFromCefV8Value(arguments[1]);
NSFileManager *fm = [NSFileManager defaultManager];
NSError *error = nil;
[fm moveItemAtPath:sourcePath toPath:targetPath error:&error];
if (error) {
exception = [[error localizedDescription] UTF8String];
}
return true;
}
else if (name == "moveToTrash") {
NSString *sourcePath = stringFromCefV8Value(arguments[0]);
bool success = [[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation

View File

@@ -81,7 +81,7 @@ module.exports =
paths
move: (source, target) ->
$native.move(source, target)
nodeFs.renameSync(source, target)
# Remove a file at the given path. Throws an error if path is not a
# file or a symbolic link to a file.