added symbolic_permissions() and octal_permissions() to the File helper
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index 21ed5ff..bdde2d5 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -368,4 +368,92 @@
 	}

 }

 

+// --------------------------------------------------------------------

+

+/**

+ * Symbolic Permissions

+ *

+ * Takes a numeric value representing a file's permissions and returns

+ * standard symbolic notation representing that value

+ *

+ * @access	public

+ * @param	int

+ * @return	string

+ */	

+if (! function_exists('symbolic_permissions'))

+{

+	function symbolic_permissions($perms)

+	{	

+		if (($perms & 0xC000) == 0xC000)

+		{

+			$symbolic = 's'; // Socket

+		}

+		elseif (($perms & 0xA000) == 0xA000)

+		{

+			$symbolic = 'l'; // Symbolic Link

+		}

+		elseif (($perms & 0x8000) == 0x8000)

+		{

+			$symbolic = '-'; // Regular

+		}

+		elseif (($perms & 0x6000) == 0x6000)

+		{

+			$symbolic = 'b'; // Block special

+		}

+		elseif (($perms & 0x4000) == 0x4000)

+		{

+			$symbolic = 'd'; // Directory

+		}

+		elseif (($perms & 0x2000) == 0x2000)

+		{

+			$symbolic = 'c'; // Character special

+		}

+		elseif (($perms & 0x1000) == 0x1000)

+		{

+			$symbolic = 'p'; // FIFO pipe

+		}

+		else

+		{

+			$symbolic = 'u'; // Unknown

+		}

+

+		// Owner

+		$symbolic .= (($perms & 0x0100) ? 'r' : '-');

+		$symbolic .= (($perms & 0x0080) ? 'w' : '-');

+		$symbolic .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-'));

+

+		// Group

+		$symbolic .= (($perms & 0x0020) ? 'r' : '-');

+		$symbolic .= (($perms & 0x0010) ? 'w' : '-');

+		$symbolic .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-'));

+

+		// World

+		$symbolic .= (($perms & 0x0004) ? 'r' : '-');

+		$symbolic .= (($perms & 0x0002) ? 'w' : '-');

+		$symbolic .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-'));

+

+		return $symbolic;		

+	}

+}

+

+// --------------------------------------------------------------------

+

+/**

+ * Octal Permissions

+ *

+ * Takes a numeric value representing a file's permissions and returns

+ * a three character string representing the file's octal permissions

+ *

+ * @access	public

+ * @param	int

+ * @return	string

+ */	

+if (! function_exists('octal_permissions'))

+{

+	function octal_permissions($perms)

+	{

+		return substr(sprintf('%o', $perms), -3);

+	}

+}

+

 ?>
\ No newline at end of file
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 07637db..7ce6727 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -90,6 +90,7 @@
     <li>Helpers

 		<ul>

 			<li>Added a <a href="helpers/compatibility_helper.html">Compatibility Helper</a> for using some common PHP 5 functions safely in applications that might run on PHP 4 servers (thanks Seppo for the hard work and code contribution!)</li>

+			<li>Added <kbd>symbolic_permissions()</kbd> and <kbd>octal_permissions()</kbd> to the <a href='helpers/file_helper.html'>File helper</a>.</li>

 			<li>Added <kbd>form_button()</kbd> in the <a href="helpers/form_helper.html">Form helper</a>.</li>

 			<li>Changed the radio() and checkbox() functions to default to not checked by default.</li>

 			<li>Added the ability to include an optional HTTP Response Code in the <kbd>redirect()</kbd> function of the <a href="helpers/url_helper.html">URL Helper</a>.</li>

diff --git a/user_guide/helpers/file_helper.html b/user_guide/helpers/file_helper.html
index 3fa9246..13d0beb 100644
--- a/user_guide/helpers/file_helper.html
+++ b/user_guide/helpers/file_helper.html
@@ -142,7 +142,25 @@
 echo $file . ' is has a mime type of ' . get_mime_by_extension($file);</code>

 </p>

 <p class="critical"><strong>Note:</strong> This is not an accurate way of determining file mime types, and is here strictly as a convenience. It should not be  used for security.</p>

+

+<h2>symbolic_permissions(<kbd>$perms</kbd>)</h2>

+

+<p>Takes numeric permissions (such as is returned by <kbd>fileperms()</kbd> and returns standard symbolic notation of file permissions.</p>

+

+<code>echo symbolic_permissions(fileperms('./index.php'));<br />

+<br />

+// -rw-r--r--</code>

+

+<h2>octal_permissions(<kbd>$perms</kbd>)</h2>

+

+<p>Takes numeric permissions (such as is returned by <kbd>fileperms()</kbd> and returns a three character octal notation of file permissions.</p>

+

+<code>echo octal_permissions(fileperms('./index.php'));<br />

+<br />

+// 644</code>

+

 </div>

+

 <!-- END CONTENT -->