File.js
authoralan <alan@alanfast.akbkhome.com>
Mon, 19 Apr 2010 03:32:47 +0000 (11:32 +0800)
committeralan <alan@alanfast.akbkhome.com>
Mon, 19 Apr 2010 03:32:47 +0000 (11:32 +0800)
File.js

diff --git a/File.js b/File.js
index 65f0003..2b74b09 100755 (executable)
--- 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);