| ILIAS
    Release_4_4_x_branch Revision 61816
    | 
fileUtils class various functions for zip-archive handling More...
 Collaboration diagram for ilFileUtils:
 Collaboration diagram for ilFileUtils:| Public Member Functions | |
| processZipFile ($a_directory, $a_file, $structure, $ref_id=null, $containerType=null, $tree=null, $access_handler=null) | |
| unzips in given directory and processes uploaded zip for use as single files | |
| recursive_dirscan ($dir, &$arr) | |
| Recursively scans a given directory and writes path and filename into referenced array. | |
| createObjects ($dir, $structure, $ref_id, $containerType, $tree=null, $access_handler=null) | |
| Recursively scans a given directory and creates file and folder/category objects. | |
| createContainer ($name, $ref_id, $containerType, $tree=null, $access_handler=null) | |
| Creates and inserts container object (folder/category) into tree. | |
| createFile ($filename, $path, $ref_id, $tree=null, $access_handler=null) | |
| Creates and inserts file object into tree. | |
| utf8_encode ($string) | |
| utf8-encodes string if it is not a valid utf8-string. | |
| fastBase64Decode ($filein, $fileout) | |
| decodes base encoded file row by row to prevent memory exhaust | |
| fastBase64Encode ($filein, $fileout) | |
| decodes base encoded file row by row to prevent memory exhaust | |
| fastGZip ($in, $out, $level="9") | |
| fast compressing the file with the zlib-extension without memory consumption | |
| fastGunzip ($in, $out) | |
| fast uncompressing the file with the zlib-extension without memory consumption | |
| Static Public Member Functions | |
| static | _lookupMimeType ($a_file) | 
fileUtils class various functions for zip-archive handling
Definition at line 38 of file class.ilFileUtils.php.
| 
 | static | 
| string | file absolute path to file | 
Definition at line 483 of file class.ilFileUtils.php.
Referenced by ilFileXMLParser\handlerEndTag().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileUtils::createContainer | ( | $name, | |
| $ref_id, | |||
| $containerType, | |||
| $tree = null, | |||
| $access_handler = null | |||
| ) | 
Creates and inserts container object (folder/category) into tree.
| string | $name | Name of the object | 
| integer | $ref_id | ref_id of parent | 
| string | $containerType | Fold or Cat | 
Definition at line 242 of file class.ilFileUtils.php.
Referenced by createObjects().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileUtils::createFile | ( | $filename, | |
| $path, | |||
| $ref_id, | |||
| $tree = null, | |||
| $access_handler = null | |||
| ) | 
Creates and inserts file object into tree.
| string | $filename | Name of the object | 
| string | $path | Path to file | 
| integer | $ref_id | ref_id of parent | 
Definition at line 301 of file class.ilFileUtils.php.
References $filename, $path, $ref_id, ilObjMediaObject\getMimeType(), ilUtil\stripSlashes(), and utf8_encode().
Referenced by createObjects().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileUtils::createObjects | ( | $dir, | |
| $structure, | |||
| $ref_id, | |||
| $containerType, | |||
| $tree = null, | |||
| $access_handler = null | |||
| ) | 
Recursively scans a given directory and creates file and folder/category objects.
Calls createContainer & createFile to store objects in tree
| string | $dir | Directory to start from | 
| boolean | structure True if archive structure is to be overtaken (otherwise flat inclusion) | |
| integer | $ref_id | ref_id of parent object, if null, files won�t be included in system (just checked) | 
| string | containerType object type of created containerobjects (folder or category) | 
Definition at line 196 of file class.ilFileUtils.php.
References ilFileUtilsException\$BROKEN_FILE, $file, $lng, $ref_id, createContainer(), createFile(), and utf8_encode().
Referenced by processZipFile().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileUtils::fastBase64Decode | ( | $filein, | |
| $fileout | |||
| ) | 
decodes base encoded file row by row to prevent memory exhaust
| string | $filename | name of file to read | 
| string | $fileout | name where to put decoded file | 
Definition at line 379 of file class.ilFileUtils.php.
Referenced by ilFileXMLParser\handlerEndTag().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileUtils::fastBase64Encode | ( | $filein, | |
| $fileout | |||
| ) | 
decodes base encoded file row by row to prevent memory exhaust
| string | $filename | name of file to read | 
Definition at line 401 of file class.ilFileUtils.php.
| ilFileUtils::fastGunzip | ( | $in, | |
| $out | |||
| ) | 
fast uncompressing the file with the zlib-extension without memory consumption
| string | $in | filename | 
| string | $out | filename | 
Definition at line 459 of file class.ilFileUtils.php.
Referenced by ilFileXMLParser\handlerEndTag().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileUtils::fastGZip | ( | $in, | |
| $out, | |||
| $level = "9" | |||
| ) | 
fast compressing the file with the zlib-extension without memory consumption
| string | $in | filename | 
| string | $out | filename | 
| string | $level | compression level from 1 to 9 | 
Definition at line 428 of file class.ilFileUtils.php.
| ilFileUtils::processZipFile | ( | $a_directory, | |
| $a_file, | |||
| $structure, | |||
| $ref_id = null, | |||
| $containerType = null, | |||
| $tree = null, | |||
| $access_handler = null | |||
| ) | 
unzips in given directory and processes uploaded zip for use as single files
| string | $a_directory | Directory to unzip | 
| string | $a_file | Filename of archive | 
| boolean | structure True if archive structure is to be overtaken | |
| integer | $ref_id | ref_id of parent object, if null, files wont be included in system (just checked) | 
| string | containerType object type of created containerobjects (folder or category) | 
| ilFileUtilsException | 
Definition at line 53 of file class.ilFileUtils.php.
References ilFileUtilsException\$BROKEN_FILE, ilFileUtilsException\$DOUBLETTES_FOUND, $file, ilFileUtilsException\$INFECTED_FILE, $lng, $ref_id, createObjects(), ilUtil\delDir(), recursive_dirscan(), ilUtil\unzip(), utf8_encode(), and ilUtil\virusHandling().
Referenced by ilCloudPluginUploadGUI\handleFileUpload(), ilObjFileGUI\handleFileUpload(), ilObjExercise\processUploadedFile(), and ilObjFileGUI\saveUnzip().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileUtils::recursive_dirscan | ( | $dir, | |
| & | $arr | ||
| ) | 
Recursively scans a given directory and writes path and filename into referenced array.
| string | $dir | Directory to start from | 
| array | &$arr | Referenced array which is filled with Filename and path | 
Definition at line 152 of file class.ilFileUtils.php.
References ilFileUtilsException\$BROKEN_FILE, $file, and $lng.
Referenced by ilSCORM13Package\dbImportSco(), ilSCORM2004Asset\exportPDF(), ilObjSCORM2004LearningModule\exportPDF(), ilObjTest\getCustomStyles(), ilObjExercise\processUploadedFile(), processZipFile(), and ilUtil\unzip().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilFileUtils::utf8_encode | ( | $string | ) | 
utf8-encodes string if it is not a valid utf8-string.
| string | $string | String to encode | 
Definition at line 358 of file class.ilFileUtils.php.
Referenced by createFile(), createObjects(), ilSCORM13Package\dbImportSco(), ilObjExercise\processUploadedFile(), and processZipFile().
 Here is the caller graph for this function:
 Here is the caller graph for this function: