file_uri_scheme

file_uri_scheme($uri)

Returns the scheme of a URI (e.g. a stream).

Deprecated

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

Related topics

File interface
Common file handling functions.

File

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

Code

function file_uri_scheme($uri) {
  return \Drupal::service('file_system')->uriScheme($uri);
}
doc_Drupal
2016-10-29 09:14:18
Comments
Leave a Comment

Please login to continue.