Functions for modules to use the managed file repository. Modules using this repository don't have to deal with filenames, directory, size limits, or creating download URLs.
File Manager supports both private(access controlled) and public files. When a module adds a file to the file manager they specify which type of file it is. A module may use both public and private files at the same time, but an individual may only be public or private.
| Name | Location | Description |
|---|---|---|
| filemanager_add_file | filemanager/filemanager.module | Adds a file into the repository as a working copy |
| filemanager_add_upload | filemanager/filemanager.module | Saves a file uploaded into a the file store as a working copy. |
| filemanager_area_list | filemanager/filemanager.module | Returns a list of file areas used by the current module set |
| filemanager_create_directory_path | filemanager/filemanager.module | Returns the path to a the directory where this file is located. |
| filemanager_create_path | filemanager/filemanager.module | Returns the path to a file in the filestore |
| filemanager_delete | filemanager/filemanager.module | Removes a file from a repository |
| filemanager_get_area_info | filemanager/filemanager.module | Returns statistics object about a given filestore area. The object contains the following fields: size - the total size of all files in the area filecount - which is the number of files in the area. sizelimit - the size limit for this area |
| filemanager_get_file_info | filemanager/filemanager.module | Returns a filestore object containing information about a given file. Passing in a filestore object will just pass the same object back out. |
| filemanager_get_size | filemanager/filemanager.module | Returns the total size in bytes of all current active files. |
| filemanager_get_working_copy | filemanager/filemanager.module | Gets a working copy of the active version of a file in the filestore |
| filemanager_get_working_size | filemanager/filemanager.module | Returns the total size in bytes of all the current working files. We have to use the filesystem since sizes of working files will not be accurate in the database. |
| filemanager_l | filemanager/filemanager.module | Create a link to download a file in the filestore. |
| filemanager_promote_working | filemanager/filemanager.module | Promotes a working copy of a file to the active copy |
| filemanager_purge_orphans | filemanager/filemanager.module | Purges out files over the age limit in the working repository for all areas |
| filemanager_purge_working | filemanager/filemanager.module | Purge a working file from the repository |
| filemanager_rename | filemanager/filemanager.module | Renames an existing file in the filestore |
| filemanager_set_private | filemanager/filemanager.module | Moves the file from public to private or vice versa |
| filemanager_transfer | filemanager/filemanager.module | Transfers a file to the client after calling modules to find out if a file is accessible for a given user. This function is here to support legacy private downloads |
| filemanager_url | filemanager/filemanager.module | Create the URL to download a file in the filestore. |
| _filemanager_update_file | filemanager/filemanager.module | helper function for filemanager_rename and filemanager_set_private does the actual file moving from $oldactive and $oldworking to the values set in the $file object |