system_file_system_settings
- Versions
- 5 – 7
system_file_system_settings()
Form builder; Configure the site file handling.
See also
Related topics
Code
modules/system/system.admin.inc, line 1525
<?php
function system_file_system_settings() {
$form['file_public_path'] = array(
'#type' => 'textfield',
'#title' => t('Public file system path'),
'#default_value' => file_directory_path(),
'#maxlength' => 255,
'#description' => t('A local file system path where public files will be stored. This directory must exist and be writable by Drupal. This directory must be relative to the Drupal installation directory and be accessible over the web.'),
'#after_build' => array('system_check_directory'),
);
$form['file_private_path'] = array(
'#type' => 'textfield',
'#title' => t('Private file system path'),
'#default_value' => file_directory_path('private'),
'#maxlength' => 255,
'#description' => t('A local file system path where private files will be stored. This directory must exist and be writable by Drupal. This directory should not be accessible over the web.'),
'#after_build' => array('system_check_directory'),
);
$form['file_temporary_path'] = array(
'#type' => 'textfield',
'#title' => t('Temporary directory'),
'#default_value' => file_directory_path('temporary'),
'#maxlength' => 255,
'#description' => t('A local file system path where temporary files will be stored. This directory should not be accessible over the web.'),
'#after_build' => array('system_check_directory'),
);
$wrappers = file_get_stream_wrappers();
$options = array(
'public' => $wrappers['public']['description'],
'private' => $wrappers['private']['description']
);
$form['file_default_scheme'] = array(
'#type' => 'radios',
'#title' => t('Default download method'),
'#default_value' => 'public',
'#options' => $options,
'#description' => t('This setting is used as the preferred download method. The use of public files is more efficient, but does not provide any access control.'),
);
return system_settings_form($form, TRUE);
}
?>Login or register to post comments 