Defines a "managed_file" Form API field and a "file" field for Field module.

File

core/modules/file/file.module

Functions

Namesort descending Description
file_access Determines if a user may perform the given operation on the specified file.
file_action_info Implements hook_action_info().
file_admin_bar_map Implements hook_admin_menu_map().
file_admin_paths Implements hook_admin_paths().
file_ajax_progress Ajax callback: Retrieves upload progress.
file_ajax_upload Ajax callback: Processes file uploads and deletions.
file_autoload_info Implements hook_autoload_info().
file_build_content Builds a structured array representing the file's content.
file_config_info Implements hook_config_info().
file_cron_queue_info
file_display Returns an array containing a single display to use for a file type in a given view mode.
file_displays Deprecated Returns the display to use for a file type in a given view mode.
file_displays_load Deprecated Returns a single {file_display} array for the file type.
file_display_load Returns an array with a single value. The key is the formatter name, and the value is a {file_display} array for the file type.
file_display_save Saves a {file_display} array to config.
file_download_uri Return an URI for a file download.
file_element_info Implements hook_element_info().
file_entity_access Deprecated Deprecated wrapper function. Determines if a user may perform the given operation on the specified file.
file_entity_info Implements hook_entity_info().
file_field_attach_load Implements hook_field_attach_load().
file_field_extra_fields Implements hook_field_extra_fields().
file_file_access Implements hook_file_access().
file_file_download Implements hook_file_download().
file_file_formatter_file_field_settings Implements hook_file_formatter_FORMATTER_settings().
file_file_formatter_file_field_view Implements hook_file_formatter_FORMATTER_view().
file_file_formatter_file_image_settings Implements hook_file_formatter_FORMATTER_settings().
file_file_formatter_file_image_view Implements hook_file_formatter_FORMATTER_view().
file_file_formatter_info Implements hook_file_formatter_info().
file_file_is_readable Check if a file entity is readable or not.
file_file_predelete Implements hook_file_predelete().
file_fnmatch A wrapper function for the PHP function fnmatch().
file_get_download_token
file_get_file_references Retrieves a list of references to a file.
file_get_mimetype_type
file_get_public_and_private_stream_wrapper_names
file_get_stream_wrapper Return a specific stream wrapper's registry information.
file_get_type Determines file type for a given file.
file_hook_info Implements hook_hook_info().
file_icon_map Determines the generic icon MIME package based on a file's MIME type.
file_icon_path Creates a path to the icon for a file entity.
file_icon_url Creates a URL to the icon for a file entity.
file_info_cache_clear Clears caches that are related to file entity.
file_invalidate_field_caches Clear the field cache for any entities referencing a specific file.
file_is_local Check if a file entity is considered local or not.
file_is_page Returns whether the current page is the full page view of the passed-in file.
file_is_writeable Check if a file entity is considered writeable or not.
file_list_permissions Helper function to generate standard file permission list for a given type.
file_managed_file_pre_render Render API callback: Hides display of the upload or remove controls.
file_managed_file_process Render API callback: Expands the managed_file element type.
file_managed_file_save_upload Saves any files that have been uploaded into a managed_file element.
file_managed_file_submit Form submission handler for upload / remove buttons of managed_file elements.
file_managed_file_validate Render API callback: Validates the managed_file element.
file_managed_file_value Render API callback: Determines the value for a managed_file type element.
file_match_mimetypes Checks if pattern(s) match mimetype(s).
file_menu Implements hook_menu().
file_menu_local_tasks_alter Implements hook_menu_local_tasks_alter().
file_permission Implements hook_permission().
file_permissions_get_configured_types Returns an array of file types that should be managed by permissions.
file_progress_implementation Determines the preferred upload progress implementation.
file_query_entity_field_access_alter Implements hook_query_TAG_alter().
file_query_file_access_alter Implements hook_query_TAG_alter().
file_stream_wrappers_alter Implements hook_stream_wrappers_alter().
file_theme Implements hook_theme().
file_type_cache_reset Clears the file type cache.
file_type_determine
file_type_get_name Returns the file type name of the passed file or file type string.
file_type_get_names Returns a list of available file type names.
file_type_get_type Returns the file type of the passed file or file type string.
file_type_get_types Returns a list of all the available file types.
file_type_get_valid_extensions Returns an array of valid file extensions.
file_type_load Menu argument loader: Loads a file type by string.
file_upload_validators_pre_render Pre-render callback for adding validation descriptions to file upload fields.
file_uri URI callback for file entities.
file_view Generate an array for rendering the given file.
file_views_api Implements hook_views_api().
file_view_file Generate an array for rendering just the file portion of a file entity.
file_view_mode_label Return the label for a specific file entity view mode.
file_view_mode_labels Return an array of available view modes for file entities.
file_view_multiple End of "defgroup file_access".
template_preprocess_file_entity Process variables for file.tpl.php
_file_get_fields_by_type Find all fields that are of a certain field type.
_file_query_file_access_alter Helper for file entity access functions.
_file_sort_array_by_weight Sorts an array by weight.
_file_types_build Builds and returns the list of available file types.
_file_view_mode_menu_access Menu access callback for the 'view mode file display settings' pages.

Constants

Namesort descending Description
FILE_ACCESS_ALLOW Modules should return this value from hook_file_access() to allow access to a file.
FILE_ACCESS_DENY Modules should return this value from hook_file_access() to deny access to a file.
FILE_ACCESS_IGNORE Modules should return this value from hook_file_access() to not affect file access.
FILE_TYPE_NONE The {file_managed}.type value when the file type has not yet been determined.
FILE_TYPE_STORAGE_DEFAULT File type constant for module-defined file types.
FILE_TYPE_STORAGE_NORMAL File types constant for user-defined file types.
FILE_TYPE_STORAGE_OVERRIDE File type constant for file types that override module-defined presets.