function _soundmanager2_check_directory_readable in SoundManager2 7.2
Same name and namespace in other branches
- 6.2 soundmanager2.module \_soundmanager2_check_directory_readable()
Function to check if directory exists and is readable
1 call to _soundmanager2_check_directory_readable()
- soundmanager2_admin_validate in ./
soundmanager2.module - Validation callback for the admin settings form.
File
- ./
soundmanager2.module, line 690 - Responsible for managing the required SWF and JS files for soundmanager2 to work
Code
function _soundmanager2_check_directory_readable(&$directory) {
if (!file_stream_wrapper_valid_scheme(file_uri_scheme($directory))) {
// Only trim if we're not dealing with a stream.
$directory = rtrim($directory, '/\\');
}
// Check if directory exists.
if (!is_dir($directory)) {
return FALSE;
}
return TRUE;
}