/sources/abstract_file_manager.php

Description
Functions
afm_copy (line 648)

Copies a file (NOT a directory) on the open AFM connection.

void afm_copy (PATH $old_path, PATH $new_path, boolean $world_access)
  • PATH $old_path: The path to the file we are copying.
  • PATH $new_path: The target path.
  • boolean $world_access: Whether world access is required for the copy.
afm_delete_directory (line 546)

Delete a directory over the open AFM connection.

void afm_delete_directory (PATH $basic_path, [boolean $recursive = false])
  • PATH $basic_path: The path to and of the directory we are deleting.
  • boolean $recursive: Whether we should recursively delete any child files and directories.
afm_delete_file (line 697)

Deletes a file (NOT a directory) on the open AFM connection.

void afm_delete_file (PATH $basic_path)
  • PATH $basic_path: The path to the file we are deleting.
afm_make_directory (line 452)

Make a directory over the open AFM connection.

void afm_make_directory (PATH $basic_path, boolean $world_access, [boolean $recursive = false])
  • PATH $basic_path: The path to and of the directory we are making.
  • boolean $world_access: Whether world access is required.
  • boolean $recursive: Whether we should recursively make any directories that are missing in the given path, until we can make the final directory.
afm_make_file (line 585)

Make a new file over the open AFM connection. Will overwrite if already exists (assuming has access).

void afm_make_file (PATH $basic_path, string $contents, boolean $world_access)
  • PATH $basic_path: The path to the file we are making.
  • string $contents: The desired file contents.
  • boolean $world_access: Whether world access is required.
afm_move (line 662)

Moves a file on the open AFM connection.

void afm_move (PATH $basic_old_path, PATH $basic_new_path)
  • PATH $basic_old_path: The path to the file we are moving from.
  • PATH $basic_new_path: The target path.
afm_read_file (line 636)

Read a file (not actually over the open AFM connection, but same result: we can do this directly).

  • return: The contents of the file.
string afm_read_file (PATH $path)
  • PATH $path: The path to the file we are reading.
afm_set_perms (line 433)

Sets permissions over the open AFM connection.

void afm_set_perms (PATH $basic_path, boolean $world_access)
  • PATH $basic_path: The path of the file/directory we are setting permissions of.
  • boolean $world_access: Whether world access is required.
force_have_afm_details (line 56)

Make sure that the AFM connection details have been posted. If not, get them and loop back.

void force_have_afm_details ()
get_afm_form (line 118)

Force an AFM login.

void get_afm_form ()
get_afm_form_fields (line 146)

Get the fields that need to be filled in to know how to do an AFM connection.

  • return: The form fields.
tempcode get_afm_form_fields ()
init__abstract_file_manager (line 28)

Standard code module initialisation function.

void init__abstract_file_manager ()
_access_string (line 404)

Convert an integer permission to the string version.

  • return: The string version.
string _access_string (integer $access_int)
  • integer $access_int: The integer permission.
_ftp_info (line 237)

Return the FTP connection, from stored/posted details.

  • return: The FTP connection (false: not connecting via FTP).
~resource _ftp_info ([boolean $light_fail = false])
  • boolean $light_fail: Whether to simply echo-out errors.
_get_dir_tree (line 514)

Get a list of files under a directory.

  • return: An array of directories found under this recursive level.
array _get_dir_tree (PATH $base, [PATH $at = ''])
  • PATH $base: The base directory for the search.
  • PATH $at: The directory where we are searching under.
_rescope_path (line 415)

Rescope an ocPortal path to a path suitable for the AFM connection.

  • return: Rescoped path.
PATH _rescope_path (PATH $path)
  • PATH $path: Original path.
_translate_dir_access (line 348)

Translate truth about needing world write access to a directory to absolute permissions.

  • return: The absolute permission.
integer _translate_dir_access (boolean $world_access)
  • boolean $world_access: Whether world directory access is required.
_translate_file_access (line 367)

Translate truth about needing world write access to a file to absolute permissions.

  • return: The absolute permission.
integer _translate_file_access (boolean $world_access, [ID_TEXT $file_type = ''])
  • boolean $world_access: Whether world file access is required.
  • ID_TEXT $file_type: The file type (blank: don't care).

Documentation generated on Sun, 02 Jan 2011 23:06:52 +0000 by phpDocumentor 1.4.3