var dest = Gio.file_new_for_path(String(destPath));
return dest.make_directory(null, null);
},
-
- copyFile : function (srcPath, destPath) {
+ /**
+ * copyFile
+ * @arg {String} src source path
+ * @arg {String} dest destination path
+ * @arg {Gio.FileCopyFlags} options (optional) - use Gio.FileCopyFlags.OVERWRITE to .. overwrite..
+ *
+ */
+ copyFile : function (srcPath, destPath, opts) {
+ if (typeof(opts) =='undefined') {
+ opts = Gio.FileCopyFlags.NONE
+ }
var dest = Gio.file_new_for_path(String(destPath));
var src = Gio.file_new_for_path(String(srcPath));
// a bit of a hack for the fact that Gio.File.copy arguments
// can be nulled, but not according to the GIR file
- return src.copy(dest, Gio.FileCopyFlags.NONE);
+ return src.copy(dest, opts);
},
recursiveListing : function (dir) {