]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
libvaladoc: Add API documentation for file utils
authorFlorian Brosch <flo.brosch@gmail.com>
Mon, 28 Feb 2011 00:47:35 +0000 (01:47 +0100)
committerFlorian Brosch <flo.brosch@gmail.com>
Mon, 28 Feb 2011 00:47:35 +0000 (01:47 +0100)
src/libvaladoc/filehelper.vala

index edd47bfca4f6c5216a5290dbebedf96c51baecdf..d8b2ef621553c5b1af01b2b340cac505cc457803 100755 (executable)
@@ -26,6 +26,12 @@ namespace Valadoc {
        [CCode (cprefix = "", cname = "PACKAGE_ICONDIR")]
        public extern const string icons_dir;
 
+       /**
+        * Makes a copy of the file src to dest. 
+        *
+        * @param src the file to copy
+        * @param dest the destination path
+        */
        public bool copy_file (string src, string dest) {
                GLib.FileStream fsrc = GLib.FileStream.open (src, "rb");
                if (fsrc == null) {
@@ -44,6 +50,12 @@ namespace Valadoc {
                return true;
        }
 
+       /**
+        * Makes a copy of the directory src to dest. 
+        *
+        * @param src the directory to copy
+        * @param dest the destination path
+        */
        public bool copy_directory (string src, string dest) {
                string _src = (src.has_suffix ( "/" ))? src : src + "/";
                string _dest = (dest.has_suffix ( "/" ))? dest : dest + "/";
@@ -62,6 +74,11 @@ namespace Valadoc {
                return true;
        }
 
+       /**
+        * A recursive directory delete function
+        *
+        * @param rpath the directory to remove
+        */
        public bool remove_directory (string rpath) {
                try {
                        GLib.Dir dir = GLib.Dir.open ( rpath );
@@ -91,6 +108,12 @@ namespace Valadoc {
                return true;
        }
 
+       /**
+        * Returns canonicalized absolute pathname
+        *
+        * @param basedir the path being checked
+        * @return a canonicalized absolute pathname
+        */
        public string realpath (string basedir) {
                return Vala.CodeContext.realpath (basedir);
        }