function file_check_path in Coder 7
Same name and namespace in other branches
- 5.2 scripts/coder_format/coder_format.php \file_check_path()
- 6.2 scripts/coder_format/coder_format.php \file_check_path()
- 6 scripts/coder_format/coder_format.php \file_check_path()
- 7.2 scripts/coder_format/coder_format.php \file_check_path()
Checks path to see if it is a directory, or a dir/file.
Parameters
$path A string containing a file path. This will be set to the: directory's path.
Return value
If the directory is not in a Drupal writable directory, FALSE is returned. Otherwise, the base name of the path is returned.
1 call to file_check_path()
- file_copy in scripts/
coder_format/ coder_format.php - Copies a file to a new location. This is a powerful function that in many ways performs like an advanced version of copy().
File
- scripts/
coder_format/ coder_format.php, line 128 - Coder format shell invocation script.
Code
function file_check_path(&$path) {
// Check if path is a directory.
// coder_format uses file_check_path() to check for files only. 26/01/2008 sun
// Check if path is a possible dir/file.
$filename = basename($path);
$path = dirname($path);
if (file_check_directory($path)) {
return $filename;
}
return FALSE;
}