You are here

function file_stream_wrapper_valid_scheme in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/includes/file.inc \file_stream_wrapper_valid_scheme()

Checks that the scheme of a stream URI is valid.

Deprecated

in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use \Drupal\Core\File\FileSystem::validScheme().

Related topics

8 calls to file_stream_wrapper_valid_scheme()
FileDownloadController::download in core/modules/system/src/FileDownloadController.php
Handles private file transfers.
file_prepare_directory in core/includes/file.inc
Checks that the directory exists and is writable.
file_save_upload in core/modules/file/file.module
Saves file uploads to a new location.
file_stream_wrapper_uri_normalize in core/includes/file.inc
Normalizes a URI by making it syntactically correct.
file_valid_uri in core/includes/file.inc
Determines whether the URI has a valid scheme for file API operations.

... See full list

File

core/includes/file.inc, line 106
API for handling file uploads and server file management.

Code

function file_stream_wrapper_valid_scheme($scheme) {
  return \Drupal::service('file_system')
    ->validScheme($scheme);
}