Moodle  2.2.1
http://www.collinsharper.com
virtual_root_file Class Reference

Public Member Functions

 __construct ($contextid, $component, $filearea, $itemid)
 is_directory ()
 delete ()
 add_to_curl_request (&$curlrequest, $key)
 get_content_file_handle ()
 readfile ()
 get_content ()
 copy_content_to ($pathname)
 list_files (file_packer $packer)
 extract_to_pathname (file_packer $packer, $pathname)
 extract_to_storage (file_packer $packer, $contextid, $component, $filearea, $itemid, $pathbase, $userid=NULL)
 archive_file (file_archive $filearch, $archivepath)
 get_parent_directory ()
 get_contextid ()
 get_component ()
 get_filearea ()
 get_itemid ()
 get_filepath ()
 get_filename ()
 get_userid ()
 get_filesize ()
 get_mimetype ()
 get_timecreated ()
 get_timemodified ()
 get_status ()
 get_id ()
 get_contenthash ()
 get_pathnamehash ()
 get_license ()
 get_author ()
 get_source ()
 get_sortorder ()

Protected Attributes

 $contextid
 $component
 $filearea
 $itemid

Detailed Description

Definition at line 39 of file virtual_root_file.php.


Constructor & Destructor Documentation

__construct ( contextid,
component,
filearea,
itemid 
)

Constructor

Definition at line 48 of file virtual_root_file.php.


Member Function Documentation

add_to_curl_request ( &$  curlrequest,
key 
)

adds this file path to a curl request (POST only)

Parameters:
curl$curlrequestthe curl request object
string$keywhat key to use in the POST request

Definition at line 77 of file virtual_root_file.php.

archive_file ( file_archive filearch,
archivepath 
)

Add file/directory into archive

Parameters:
object$filearch
string$archivepathpathname in archive
Returns:
bool success

Definition at line 154 of file virtual_root_file.php.

copy_content_to ( pathname)

Copy content of file to given pathname

Parameters:
string$pathnamereal path to new file
Returns:
bool success

Definition at line 110 of file virtual_root_file.php.

delete ( )

Delete file

Returns:
success

Definition at line 67 of file virtual_root_file.php.

extract_to_pathname ( file_packer packer,
pathname 
)

Extract file to given file path (real OS filesystem), existing files are overwrited

Parameters:
object$file_packer
string$pathnametarget directory
Returns:
mixed list of processed files; false if error

Definition at line 129 of file virtual_root_file.php.

extract_to_storage ( file_packer packer,
contextid,
component,
filearea,
itemid,
pathbase,
userid = NULL 
)

Extract file to given file path (real OS filesystem), existing files are overwrited

Parameters:
object$file_packer
int$contextid
string$component
string$filearea
int$itemid
string$pathbase
int$userid
Returns:
mixed list of processed files; false if error

Definition at line 144 of file virtual_root_file.php.

Definition at line 230 of file virtual_root_file.php.

Definition at line 170 of file virtual_root_file.php.

Here is the caller graph for this function:

Returns file content as string

Returns:
string content

Definition at line 101 of file virtual_root_file.php.

Returns file handle - read only mode, no writing allowed into pool files!

Returns:
file handle

Definition at line 85 of file virtual_root_file.php.

Definition at line 218 of file virtual_root_file.php.

Definition at line 166 of file virtual_root_file.php.

Here is the caller graph for this function:

Definition at line 174 of file virtual_root_file.php.

Here is the caller graph for this function:

Definition at line 186 of file virtual_root_file.php.

Here is the caller graph for this function:

Definition at line 182 of file virtual_root_file.php.

Here is the caller graph for this function:

Definition at line 194 of file virtual_root_file.php.

get_id ( )

Definition at line 214 of file virtual_root_file.php.

Definition at line 178 of file virtual_root_file.php.

Here is the caller graph for this function:

Definition at line 226 of file virtual_root_file.php.

Definition at line 198 of file virtual_root_file.php.

Returns parent directory

Returns:
object stored_file

Definition at line 162 of file virtual_root_file.php.

Definition at line 222 of file virtual_root_file.php.

Here is the call graph for this function:

Definition at line 238 of file virtual_root_file.php.

Definition at line 234 of file virtual_root_file.php.

Definition at line 210 of file virtual_root_file.php.

Definition at line 202 of file virtual_root_file.php.

Definition at line 206 of file virtual_root_file.php.

Definition at line 190 of file virtual_root_file.php.

Is this a directory?

Returns:
bool

Definition at line 59 of file virtual_root_file.php.

list_files ( file_packer packer)

List contents of archive

Parameters:
object$file_packer
Returns:
array of file infos

Definition at line 119 of file virtual_root_file.php.

readfile ( )

Dumps file content to page

Returns:
file handle

Definition at line 93 of file virtual_root_file.php.


Field Documentation

$component [protected]

Definition at line 41 of file virtual_root_file.php.

$contextid [protected]

Definition at line 40 of file virtual_root_file.php.

$filearea [protected]

Definition at line 42 of file virtual_root_file.php.

$itemid [protected]

Definition at line 43 of file virtual_root_file.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations