ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Access class for file objects. More...
Public Member Functions | |
canBeDelivered (ilWACPath $ilWACPath) | |
_lookupVersion ($a_id) | |
lookup version More... | |
_lookupFileSize ($a_id) | |
lookup size More... | |
Public Member Functions inherited from ilObjectAccess | |
_checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="") | |
Checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More... | |
_checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id) | |
check condition More... | |
Static Public Member Functions | |
static | _getCommands () |
get commands More... | |
static | _checkGoto ($a_target) |
check whether goto script will succeed More... | |
static | _lookupFileData ($a_id) |
looks up the file_data for the file object with the specified object id as an associative array. More... | |
static | _lookupVersion ($a_id) |
lookup version More... | |
static | _lookupFileSize ($a_id) |
Quickly looks up the file size from the database and returns the number of bytes. More... | |
static | _lookupFileSizeFromFilesystem ($a_id) |
Looks up the file size by retrieving it from the filesystem. More... | |
static | _lookupSuffix ($a_id) |
lookup suffix More... | |
static | _lookupDiskUsage ($a_id) |
Returns the number of bytes used on the harddisk by the file object with the specified object id. More... | |
static | _isFileInline ($a_file_name) |
Returns true, if the specified file shall be displayed inline in the browser. More... | |
static | _getFileExtension ($a_file_name) |
Gets the file extension of the specified file name. More... | |
static | _isFileHidden ($a_file_name) |
Returns true, if a file with the specified name, is usually hidden from the user. More... | |
static | _appendNumberOfCopyToFilename ($a_file_name, $nth_copy=null, $a_handle_extension=false) |
Appends the text " - Copy" to a filename in the language of the current user. More... | |
static | _getPermanentDownloadLink ($ref_id) |
Gets the permanent download link for the file. More... | |
static | _preloadData ($a_obj_ids, $a_ref_ids) |
static | getListGUIData ($a_obj_id) |
Static Public Member Functions inherited from ilObjectAccess | |
static | _getCommands () |
get commands More... | |
static | _checkGoto ($a_target) |
check whether goto script will succeed More... | |
static | _isOffline ($a_obj_id) |
Type-specific implementation of general status, has to be overwritten. More... | |
static | _preloadData ($a_obj_ids, $a_ref_ids) |
Preload data. More... | |
Static Protected Attributes | |
static | $_inlineFileExtensionsArray |
Contains an array of extensions separated by space. More... | |
static | $preload_list_gui_data |
|
static |
Appends the text " - Copy" to a filename in the language of the current user.
If the provided $nth_copy parameter is greater than 1, then is appended in round brackets. If $nth_copy parameter is null, then the function determines the copy number on its own.
If this function detects, that the filename already ends with " - Copy", or with "- Copy ($nth_copy), it only appends the number of the copy to the filename.
This function retains the extension of the filename.
Examples:
Definition at line 317 of file class.ilObjFileAccess.php.
References $lng, and _getFileExtension().
Referenced by ilObject\appendCopyInfo(), and ilContainerGUI\performPasteIntoMultipleObjectsObject().
|
static |
check whether goto script will succeed
Definition at line 93 of file class.ilObjFileAccess.php.
References ilSharedResourceGUI\hasAccess().
|
static |
get commands
this method returns an array of all possible commands/permission combinations
example: $commands = array ( array("permission" => "read", "cmd" => "view", "lang_var" => "show"), array("permission" => "write", "cmd" => "edit", "lang_var" => "edit"), );
Definition at line 80 of file class.ilObjFileAccess.php.
References array.
Referenced by ilObjFileListGUI\init().
|
static |
Gets the file extension of the specified file name.
The file name extension is converted to lower case before it is returned.
For example, for the file name "HELLO.MP3", this function returns "mp3".
A file name extension can have multiple parts. For the file name "hello.tar.gz", this function returns "gz".
string | $a_file_name | The file name |
Definition at line 260 of file class.ilObjFileAccess.php.
Referenced by _appendNumberOfCopyToFilename(), ilObjFile\checkFileExtension(), ilObjFile\getFileExtension(), ilObjFileListGUI\getProperties(), ilObjFileGUI\handleFileUpload(), ilObjFileGUI\save(), and ilFilePreviewRenderer\supports().
|
static |
Gets the permanent download link for the file.
Definition at line 391 of file class.ilObjFileAccess.php.
References $ref_id, and ilLink\_getStaticLink().
Referenced by ilObjFileListGUI\getCommandLink(), and ilObjFileGUI\infoScreenForward().
|
static |
Returns true, if a file with the specified name, is usually hidden from the user.
Definition at line 281 of file class.ilObjFileAccess.php.
Referenced by ilItemGroupItems\getAssignableItems(), ilObjectListGUI\getListItemHTML(), ilContainer\getSubItems(), ilObjFile\isHidden(), and ilExportSelectionTableGUI\parseContainer().
|
static |
Returns true, if the specified file shall be displayed inline in the browser.
Definition at line 237 of file class.ilObjFileAccess.php.
Referenced by ilObjFileListGUI\getCommandFrame(), ilObjFileListGUI\getIconImageType(), and ilObjFile\isInline().
|
static |
Returns the number of bytes used on the harddisk by the file object with the specified object id.
int | object id of a file object. |
Definition at line 225 of file class.ilObjFileAccess.php.
References ilUtil\dirsize().
Referenced by ilObjFile\getDiskUsage().
|
static |
looks up the file_data for the file object with the specified object id
as an associative array.
Definition at line 123 of file class.ilObjFileAccess.php.
References $ilDB, $r, $row, and ilDBConstants\FETCHMODE_ASSOC.
ilObjFileAccess::_lookupFileSize | ( | $a_id | ) |
lookup size
Definition at line 44 of file class.ilObjFileAccess.php.
References $file, $ilDB, $r, $row, $size, _lookupVersion(), and ilDBConstants\FETCHMODE_OBJECT.
|
static |
Quickly looks up the file size from the database and returns the number of bytes.
Definition at line 152 of file class.ilObjFileAccess.php.
References $ilDB, $r, $row, $size, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilObjectXMLWriter\__appendObjectProperties(), ilObjFile\_lookupFileSize(), and ilFolderDownloadBackgroundTaskHandler\calculateRecursive().
|
static |
Looks up the file size by retrieving it from the filesystem.
This function runs much slower than _lookupFileSize()! Use this function only, to update the data in the database. For example, if the file size in the database has become inconsistent for some reason.
Definition at line 171 of file class.ilObjFileAccess.php.
References $file, $ilDB, $r, $row, $size, _lookupVersion(), and ilDBConstants\FETCHMODE_OBJECT.
|
static |
lookup suffix
Definition at line 205 of file class.ilObjFileAccess.php.
References $ilDB, $r, $row, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilObjectXMLWriter\__appendObjectProperties().
ilObjFileAccess::_lookupVersion | ( | $a_id | ) |
lookup version
Definition at line 30 of file class.ilObjFileAccess.php.
References $ilDB, $r, $row, and ilDBConstants\FETCHMODE_OBJECT.
|
static |
lookup version
Definition at line 137 of file class.ilObjFileAccess.php.
References $ilDB, $r, $row, ilDBConstants\FETCHMODE_OBJECT, and ilUtil\stripSlashes().
Referenced by ilObjectXMLWriter\__appendObjectProperties(), _lookupFileSize(), _lookupFileSizeFromFilesystem(), and ilObjFile\_lookupVersion().
|
static |
ilObjFileAccess::canBeDelivered | ( | ilWACPath | $ilWACPath | ) |
\ilWACPath | $ilWACPath |
Implements ilWACCheckingClass.
Definition at line 42 of file class.ilObjFileAccess.php.
References ilWACPath\getPath(), and ilWACPath\getSecurePathId().
|
static |
Definition at line 423 of file class.ilObjFileAccess.php.
Referenced by ilObjFileListGUI\getProperties().
|
staticprotected |
Contains an array of extensions separated by space.
Since this array is needed for every file object displayed on a repository page, we only create it once, and cache it here.
Definition at line 62 of file class.ilObjFileAccess.php.
|
staticprotected |
Definition at line 65 of file class.ilObjFileAccess.php.