|
Previous Page |
Solar_Dir |
Next Page |
exists()
static public
mixed
exists (
string $dir
)
Hack for is_dir() that checks the include_path.
Parameters
- (string)
$dir: Check for this directory in the include_path.
Returns
- (mixed) If the directory exists in the include_path, returns the absolute path; if not, returns boolean false.
Description
Hack for is_dir() that checks the include_path.
Use this to see if a directory exists anywhere in the include_path.
<?php
$dir = Solar_Dir::exists('path/to/dir')
if ($dir) {
$files = scandir($dir);
} else {
echo "Not found in the include-path.";
}
?>