|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| getTimeStamp () | |
| shortenFilename ($filename, $maxlength=80) | |
| writeError ($str) | |
| unixifyPath ($path) | |
| replaceBackslashes ($path) | |
| capitalizeDriveLetter ($path) | |
| makeDirRecursive ($dir, $mode=0755) | |
| getOS () | |
| getTmpDir () | |
| getLogger ($package=false) | |
Static Public Attributes | |
| static | $logger |
Definition at line 28 of file Utility.php.
| capitalizeDriveLetter | ( | $ | path | ) |
Convert the drive letter to upper case
| $path | Windows path with "c:<blah>" |
Definition at line 138 of file Utility.php.

| getLogger | ( | $ | package = false | ) |
| getOS | ( | ) |
Returns the current OS code WIN - Windows, LIN -Linux, etc.
Definition at line 191 of file Utility.php.

| getTimeStamp | ( | ) |
Return the current timestamp in human readable format. Thursday March 17, 2005 19:10:47
Definition at line 41 of file Utility.php.
| getTmpDir | ( | ) |
| makeDirRecursive | ( | $ | dir, |
| $ | mode = 0755 |
||
| ) |
Make directory recursively. (Taken from: http://aidan.dotgeek.org/lib/?file=function.mkdirr.php)
| $dir | Directory path to create |
| $mode=0755 |
Definition at line 156 of file Utility.php.

| replaceBackslashes | ( | $ | path | ) |
Convert the back slash path separators with forward slashes.
| $path | Windows path with backslash path separators |
Definition at line 124 of file Utility.php.


| shortenFilename | ( | $ | filename, |
| $ | maxlength = 80 |
||
| ) |
Shorten the filename to some maximum characters
| $filename | Complete file path |
| $maxlength=150 | Maximum allowable length of the shortened filepath |
Definition at line 59 of file Utility.php.
| unixifyPath | ( | $ | path | ) |
Convert Windows paths to Unix paths
| $path | File path |
Definition at line 105 of file Utility.php.

| writeError | ( | $ | str | ) |
Write error log if debug is on
| $str | Error string public |
Definition at line 90 of file Utility.php.
$logger [static] |
Definition at line 30 of file Utility.php.