|
Moodle
2.2.1
http://www.collinsharper.com
|
Static Public Member Functions | |
| static | exists ($dir) |
| static | fix ($dir) |
| static | name ($file, $up=0) |
| static | tmp ($sub= '') |
Static Protected Member Functions | |
| static | _tmp () |
Static Protected Attributes | |
| static | $_tmp |
| static _tmp | ( | ) | [static, protected] |
| static exists | ( | $ | dir | ) | [static] |
Hack for [[php::is_dir() | ]] that checks the include_path.
Use this to see if a directory exists anywhere in the include_path.
{{code: php $dir = Solar_Dir::exists('path/to/dir') if ($dir) { $files = scandir($dir); } else { echo "Not found in the include-path."; } }}
| string | $dir | Check for this directory in the include_path. |
| static fix | ( | $ | dir | ) | [static] |
"Fixes" a directory string for the operating system.
Use slashes anywhere you need a directory separator. Then run the string through fixdir() and the slashes will be converted to the proper separator (for example '\' on Windows).
Always adds a final trailing separator.
| string | $dir | The directory string to 'fix'. |
| static name | ( | $ | file, |
| $ | up = 0 |
||
| ) | [static] |
| static tmp | ( | $ | sub = '' | ) | [static] |
Returns the OS-specific directory for temporary files.
| string | $sub | Add this subdirectory to the returned temporary directory name. |
Definition at line 131 of file Dir.php.

