File API

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

Documentation for File API in Drupal 7.

File API overview

The Drupal 7 File API provides an abstraction layer for accessing virtually any type of resource as a normal file.

File usage functions

One of the things to think about when using the Drupal 7 File API is the new file_usage_* functions. These provide a way for modules to

General concepts

The Drupal File API leverages PHP stream wrappers allowing virtually any type of resource to be represented as a normal file. This is a

Important Drupal 7 File API Functions

All the File API functions are at http://api.drupal.org/api/drupal/includes--file.inc/7, but it can be hard to sort out which ones you

Writing stream wrappers

This document will first discuss the implementation of a simple local stream wrapper, similar to the public wrapper included with Drupal

File API changes from Drupal 6 to Drupal 7

There are three key and pervasive things that happened to the File API between Drupal 6 and Drupal 7:

Guide maintainers

drupalastic's picture