function system_stream_wrappers

Implements hook_stream_wrappers().

File

modules/system/system.module, line 1677

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.