1.20.x system.module | system_stream_wrappers() |
Implements hook_stream_wrappers().
File
- modules/
system/ system.module, line 2084 - Configuration system that lets administrators modify the workings of the site.
Code
function system_stream_wrappers() {
$wrappers = array(
'public' => array(
'name' => t('Public files'),
'class' => 'BackdropPublicStreamWrapper',
'description' => t('Public local files served by the webserver'),
'type' => STREAM_WRAPPERS_LOCAL_NORMAL,
),
'temporary' => array(
'name' => t('Temporary files'),
'class' => 'BackdropTemporaryStreamWrapper',
'description' => t('Temporary local files for upload and previews'),
'type' => STREAM_WRAPPERS_LOCAL_HIDDEN,
),
);
// Only register the private file stream wrapper if a file path has been set.
if (config_get('system.core', 'file_private_path')) {
$wrappers['private'] = array(
'name' => t('Private files'),
'class' => 'BackdropPrivateStreamWrapper',
'description' => t('Private local files served by Backdrop'),
'type' => STREAM_WRAPPERS_LOCAL_NORMAL,
);
}
return $wrappers;
}