File interface

Same name in other branches
  1. 7.x includes/file.inc \file
  2. 8.9.x core/includes/file.inc \file
  3. 10 core/modules/file/file.api.php \file
  4. 11.x core/modules/file/file.api.php \file

Common file handling functions.

File

core/includes/file.inc, line 11

Functions

Title Sort descending Deprecated File name Summary
file_build_uri Deprecated core/includes/file.inc Constructs a URI to Drupal's default files location given a relative path.
file_create_url Deprecated core/includes/file.inc Creates a web-accessible URL for a stream to an external or local file.
file_get_file_references core/modules/file/file.module Retrieves a list of references to a file.
file_munge_filename Deprecated core/includes/file.inc Modifies a filename as needed for security purposes.
file_unmunge_filename Deprecated core/includes/file.inc Undoes the effect of file_munge_filename().
file_url_transform_relative Deprecated core/includes/file.inc Transforms an absolute URL of a local file to a relative URL.

Constants

Title Sort descending Deprecated File name Summary
FILE_STATUS_PERMANENT Deprecated core/includes/file.inc Indicates that the file is permanent and should not be deleted.

Classes

Title Sort descending File name Summary
File core/modules/file/src/Entity/File.php Defines the file entity class.

Interfaces

Title Sort descending File name Summary
FileInterface core/modules/file/src/FileInterface.php Defines getter and setter methods for file entity base fields.

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