From af0c80a360c444e746a770ae408ece0f0974b9ff Mon Sep 17 00:00:00 2001 From: alan Date: Mon, 19 Apr 2010 11:32:47 +0800 Subject: [PATCH] File.js --- File.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); -- 2.39.2