Calling all Drupal developers!
Help us get this on the first page of Digg. DIGG NOW!
Help us get this on the first page of Digg. DIGG NOW!
Common file handling functions.
| Name | Location | Description |
|---|---|---|
| file_check_directory | 5/includes/file.inc | Check that the directory exists and is writable. Directories need to have execute permissions to be considered a directory by FTP servers, etc. |
| file_check_location | 5/includes/file.inc | Check if a file is really located inside $directory. Should be used to make sure a file specified is really located within the directory to prevent exploits. |
| file_check_path | 5/includes/file.inc | Checks path to see if it is a directory, or a dir/file. |
| file_copy | 5/includes/file.inc | Copies a file to a new location. This is a powerful function that in many ways performs like an advanced version of copy(). Checks if $source and $dest are valid and readable/writable. Performs a file copy if $source is not equal to $dest. If file... |
| file_create_filename | 5/includes/file.inc | Create a full file path from a directory and filename. If a file with the specified name already exists, an alternative will be used. |
| file_create_path | 5/includes/file.inc | Make sure the destination is a complete path and resides in the file system directory, if it is not prepend the file system directory. |
| file_create_url | 5/includes/file.inc | Create the download path to a file. |
| file_delete | 5/includes/file.inc | Delete a file. |
| file_directory_path | 5/includes/file.inc | Determine the default 'files' directory. |
| file_directory_temp | 5/includes/file.inc | Determine the default temporary directory. |
| file_get_mimetype | 5/includes/file.inc | Determine an Internet Media Type, or MIME type from a filename. |
| file_move | 5/includes/file.inc | Moves a file to a new location. Checks if $source and $dest are valid and readable/writable. Performs a file move if $source is not equal to $dest. If file already exists in $dest either the call will error out, replace the file or rename the file... |
| file_save_data | 5/includes/file.inc | Save a string to the specified destination. |
| file_save_upload | 5/includes/file.inc | Saves a file upload to a new location. The source file is validated as a proper upload and handled as such. |
| file_scan_directory | 5/includes/file.inc | Finds all files that match a given mask in a given directory. Directories and files beginning with a period are excluded; this prevents hidden files and directories (such as SVN working directories) from being scanned. |
| file_transfer | 5/includes/file.inc | Transfer file using http to client. Pipes a file through Drupal to the client. |
| file_upload_max_size | 5/includes/file.inc | Determine the maximum file upload size by querying the PHP settings. |