File API

Last modified: August 20, 2009 - 20:00

The Drupal 7 File API provides an abstraction layer for accessing virtually any type of resource as a normal file. This is accomplished by leveraging the power of PHP stream wrappers allowing greater collaboration and crossover with a variety of modules. Modules will typically no longer need to know about the filesystem implementation of another in order to interact.

The main File API documentation is derived directly from comments in the code. This Handbook section augments those API docs by providing a tutorial for module authors who wish to interact with the Drupal filesystem, as well as an overview of the system from an administrator's point of view. Note that this Handbook may not cover every feature of the API.

 
 

Drupal is a registered trademark of Dries Buytaert.