function textimage_directory_check in Textimage 5.2
Same name and namespace in other branches
- 5 textimage.module \textimage_directory_check()
- 6.2 textimage.module \textimage_directory_check()
- 7.2 textimage.module \textimage_directory_check()
Create the image directory relative to the 'files' dir - if user specified one Won't allow form submit unless the directory exists & is writable
Parameters
$directory_path: String containing the path of the directory to check.
1 call to textimage_directory_check()
File
- ./
textimage.module, line 557
Code
function textimage_directory_check($directory_path) {
// create each directory necessary if it doesn't exist
foreach (explode('/', $directory_path) as $dir) {
$dirs[] = $dir;
if (!file_check_directory(implode($dirs, '/'), FILE_CREATE_DIRECTORY)) {
return FALSE;
}
}
return TRUE;
}