From: alan Date: Mon, 19 Apr 2010 03:32:47 +0000 (+0800) Subject: File.js X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=commitdiff_plain;h=af0c80a360c444e746a770ae408ece0f0974b9ff File.js --- diff --git a/File.js b/File.js index 65f0003..2b74b09 100755 --- a/File.js +++ b/File.js @@ -114,6 +114,17 @@ var File = { data_out.put_string(string, null); data_out.close(null); }, + /** + * remove + * @arg path {String} File to remove + * + * + */ + remove : function (path) + { + var f = Gio.file_new_for_path(String(path)); + return f.delete(); + } // copy files recursively from fromDir, silently ignore them if they already exist in toDir silentRecursiveCopy : function (fromDir, toDir) { var filesToCopy = File.recursiveListing(fromDir);