1 file.module file_get_public_and_private_stream_wrapper_names($flag = STREAM_WRAPPERS_VISIBLE)

File

core/modules/file/file.module, line 2735
Defines a "managed_file" Form API field and a "file" field for Field module.

Code

function file_get_public_and_private_stream_wrapper_names($flag = STREAM_WRAPPERS_VISIBLE) {
  $wrappers = array();
  foreach (file_get_stream_wrappers($flag) as $key => $wrapper) {
    if (empty($wrapper['private'])) {
      $wrappers['public'][$key] = $wrapper['name'];
    }
    else {
      $wrappers['private'][$key] = $wrapper['name'];
    }
  }
  return $wrappers;
}