You are here

function system_check_directory in Drupal 4

Same name and namespace in other branches
  1. 8 core/modules/system/system.module \system_check_directory()
  2. 5 modules/system/system.module \system_check_directory()
  3. 6 modules/system/system.module \system_check_directory()
  4. 7 modules/system/system.module \system_check_directory()
  5. 9 core/modules/system/system.module \system_check_directory()
  6. 10 core/modules/system/system.module \system_check_directory()

Checks the existence of the directory specified in $form_element. This function is called from the system_view_general form to check both the file_directory_path and file_directory_temp directories. If validation fails, the form element is flagged with an error from within the file_check_directory function.

Parameters

$form_element: The form element containing the name of the directory to check.

1 string reference to 'system_check_directory'
system_view_general in modules/system.module

File

modules/system.module, line 506
Configuration system that lets administrators modify the workings of the site.

Code

function system_check_directory($form_element) {
  file_check_directory($form_element['#value'], FILE_CREATE_DIRECTORY, $form_element['#parents'][0]);
  return $form_element;
}