function system_stream_wrappers
system_stream_wrappers()
Implements hook_stream_wrappers().
File
- modules/system/system.module, line 1657
- 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' => 'DrupalPublicStreamWrapper', 'description' => t('Public local files served by the webserver.'), 'type' => STREAM_WRAPPERS_LOCAL_NORMAL, ), 'temporary' => array( 'name' => t('Temporary files'), 'class' => 'DrupalTemporaryStreamWrapper', '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 (variable_get('file_private_path', FALSE)) { $wrappers['private'] = array( 'name' => t('Private files'), 'class' => 'DrupalPrivateStreamWrapper', 'description' => t('Private local files served by Drupal.'), 'type' => STREAM_WRAPPERS_LOCAL_NORMAL, ); } return $wrappers; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.module/function/system_stream_wrappers/7.x