From 94a2182c95cc95646ad582616d335bce62152c86 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Thu, 8 May 2008 15:00:28 +0000 Subject: added symbolic_permissions() and octal_permissions() to the File helper --- user_guide/helpers/file_helper.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'user_guide/helpers/file_helper.html') diff --git a/user_guide/helpers/file_helper.html b/user_guide/helpers/file_helper.html index 3fa92462b..13d0beb97 100644 --- a/user_guide/helpers/file_helper.html +++ b/user_guide/helpers/file_helper.html @@ -142,7 +142,25 @@ can optionally be added to the file names by setting the second parameter to TRU echo $file . ' is has a mime type of ' . get_mime_by_extension($file);

Note: 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.

+ +

symbolic_permissions($perms)

+ +

Takes numeric permissions (such as is returned by fileperms() and returns standard symbolic notation of file permissions.

+ +echo symbolic_permissions(fileperms('./index.php'));
+
+// -rw-r--r--
+ +

octal_permissions($perms)

+ +

Takes numeric permissions (such as is returned by fileperms() and returns a three character octal notation of file permissions.

+ +echo octal_permissions(fileperms('./index.php'));
+
+// 644
+ + -- cgit v1.2.3-24-g4f1b