file_check_path
- Versions
- 4.6 – 6
file_check_path(&$path)
Checks path to see if it is a directory, or a dir/file.
Parameters
$path
Related topics
Code
includes/file.inc, line 127
<?php
function file_check_path(&$path) {
// Check if path is a directory.
if (file_check_directory($path)) {
return '';
}
// Check if path is a possible dir/file.
$filename = basename($path);
$path = dirname($path);
if (file_check_directory($path)) {
return $filename;
}
return false;
}
?>Login or register to post comments 