File.js
[gnome.introspection-doc-generator] / File.js
diff --git a/File.js b/File.js
index 65f0003..647afe0 100755 (executable)
--- a/File.js
+++ b/File.js
@@ -114,6 +114,18 @@ var File = {
         data_out.put_string(string, null);
         data_out.close(null);
     },
+    /**
+     * remove 
+     * Delete a file.
+     * @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);