[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/filefield/ -> field_file.inc (summary)

(no description)

File Size: 418 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 10 functions

  field_file_load()
  field_file_save_upload()
  field_file_save_file()
  field_file_save()
  field_file_delete()
  _field_file_cache()
  field_file_check_directory()
  field_file_strip_path()
  field_file_urlencode_path()
  field_file_references()

Functions
Functions that are not part of a class:

field_file_load($fid, $reset = NULL)   X-Ref
Load a file from the database.

param: $fid
param: $reset
return:

field_file_save_upload($source, $validators = array()   X-Ref
Save a file upload to a new location.
The source file is validated as a proper upload and handled as such. By
implementing hook_file($op = 'insert'), modules are able to act on the file
upload and to add their own properties to the file.

The file will be added to the files table as a temporary file. Temporary
files are periodically cleaned. To make the file permanent file call
file_set_status() to change its status.

param: $source
param: $validators
param: $dest
return:

field_file_save_file($filepath, $validators = array()   X-Ref
Save a file into a file node after running all the associated validators.

This function is usually used to move a file from the temporary file
directory to a permanent location. It may be used by import scripts or other
modules that want to save an existing file into the database.

param: $filepath
param: $validators
param: $dest
param: $account
return:

field_file_save($node, &$file)   X-Ref
Save a node file. Delete items if necessary and set new items as permanent.

param: $node
param: $file
return: array

field_file_delete($file, $force = FALSE)   X-Ref
Delete a field file and its database record.

param: $path
param: $force
return: mixed

_field_file_cache($file = NULL, $reset = FALSE)   X-Ref
Internal cache, in order to minimize database queries for loading files.


field_file_check_directory(&$directory, $mode = 0, $form_item = NULL)   X-Ref
A silent version of file.inc's file_check_directory().

This function differs from file_check_directory in that it checks for
files when doing the directory check and it does not use drupal_set_message()
when creating directories. This function may be removed in Drupal 7.

Check that the directory exists and is writable. Directories need to
have execute permissions to be considered a directory by FTP servers, etc.

param: $directory A string containing the name of a directory path.
param: $mode A Boolean value to indicate if the directory should be created
param: $form_item An optional string containing the name of a form item that
return: FALSE when directory not found, or TRUE when directory exists.

field_file_strip_path($path)   X-Ref
Remove a possible leading file directory path from the given path.


field_file_urlencode_path($path)   X-Ref
Encode a file path in a way that is compatible with file_create_url().

This function should be used on the $file->filepath property before any call
to file_create_url(). This ensures that the file directory path prefix is
unmodified, but the actual path to the file will be properly URL encoded.

field_file_references($file)   X-Ref
Return a count of the references to a file by all modules.




Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7