file_build_uri

  1. drupal
    1. 8
    2. 7
Versions
7 – 8 file_build_uri($path)

Given a relative path, construct a URI into Drupal's default files location.

Related topics

▾ 3 functions call file_build_uri()

file_unmanaged_copy in includes/file.inc
Copies a file to a new location without invoking the file API.
StreamWrapperTest::testUriFunctions in modules/simpletest/tests/file.test
Test the URI and target functions.
system_retrieve_file in modules/system/system.module
Attempts to get a file using drupal_http_request and to store it locally.

Code

includes/file.inc, line 923

<?php
function file_build_uri($path) {
  $uri = file_default_scheme() . '://' . $path;
  return file_stream_wrapper_uri_normalize($uri);
}
?>