|
ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class ilFileUtils. More...
Collaboration diagram for ilFileUtils:Public Member Functions | |
| fastBase64Encode ($filein, $fileout) | |
| decodes base encoded file row by row to prevent memory exhaust More... | |
| fastGunzip ($in, $out) | |
| fast uncompressing the file with the zlib-extension without memory consumption More... | |
Static Public Member Functions | |
| static | 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 More... | |
| static | recursive_dirscan ($dir, &$arr) |
| Recursively scans a given directory and writes path and filename into referenced array. More... | |
| static | createObjects ($dir, $structure, $ref_id, $containerType, $tree=null, $access_handler=null) |
| Recursively scans a given directory and creates file and folder/category objects. More... | |
| static | createContainer ($name, $ref_id, $containerType, $tree=null, $access_handler=null) |
| Creates and inserts container object (folder/category) into tree. More... | |
| static | createFile ($filename, $path, $ref_id, $tree=null, $access_handler=null) |
| Creates and inserts file object into tree. More... | |
| static | getNewObjects () |
| static | utf8_encode ($string) |
| utf8-encodes string if it is not a valid utf8-string. More... | |
| static | fastBase64Decode ($filein, $fileout) |
| decodes base encoded file row by row to prevent memory exhaust More... | |
| static | lookupContentMimeType ($content) |
| static | lookupFileMimeType ($a_file) |
| static | _lookupMimeType ($a_file) |
| static | getValidExtensions () |
| Valid extensions. More... | |
| static | getDefaultValidExtensionWhiteList () |
| Valid extensions. More... | |
| static | getValidFilename ($a_filename) |
| Get valid filename. More... | |
| static | hasValidExtension ($a_filename) |
| static | rename ($a_source, $a_target) |
| Rename a file. More... | |
Static Protected Attributes | |
| static | $new_files = array() |
Private Member Functions | |
| fastGZip ($in, $out, $level="9") | |
| fast compressing the file with the zlib-extension without memory consumption More... | |
Class ilFileUtils.
Definition at line 38 of file class.ilFileUtils.php.
|
static |
| string | file absolute path to file |
Definition at line 535 of file class.ilFileUtils.php.
References lookupFileMimeType().
Referenced by ilFileXMLParser\handlerEndTag().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
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 236 of file class.ilFileUtils.php.
References $DIC, $lng, $name, and $tree.
Referenced by createObjects().
Here is the caller graph for this function:
|
static |
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 296 of file class.ilFileUtils.php.
References $DIC, $filename, $ilErr, $lng, $path, $tree, ilObjMediaObject\getMimeType(), ilUtil\stripSlashes(), and utf8_encode().
Referenced by createObjects().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
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) |
| ilFileUtilsException |
Definition at line 198 of file class.ilFileUtils.php.
References ilFileUtilsException\$BROKEN_FILE, $lng, $tree, createContainer(), createFile(), createObjects(), and utf8_encode().
Referenced by createObjects(), and processZipFile().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
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 388 of file class.ilFileUtils.php.
Referenced by ilFileXMLParser\handlerEndTag().
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 415 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 478 of file class.ilFileUtils.php.
Referenced by ilFileXMLParser\handlerEndTag().
Here is the caller graph for this function:
|
private |
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 443 of file class.ilFileUtils.php.
|
static |
Valid extensions.
Definition at line 583 of file class.ilFileUtils.php.
Referenced by getValidExtensions(), and ilObjFileAccessSettingsGUI\initUploadSettingsForm().
Here is the caller graph for this function:
|
static |
Definition at line 348 of file class.ilFileUtils.php.
References $new_files.
|
static |
Valid extensions.
Definition at line 546 of file class.ilFileUtils.php.
References $DIC, $key, and getDefaultValidExtensionWhiteList().
Referenced by ILIAS\Filesystem\Security\Sanitizing\FilenameSanitizerImpl\__construct(), ILIAS\Filesystem\Decorator\FilesystemWhitelistDecorator\__construct(), and ilObjFileAccessSettingsGUI\initUploadSettingsForm().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Get valid filename.
| string | filename |
| ilFileUtilsException |
Definition at line 837 of file class.ilFileUtils.php.
Referenced by ilFileDataMail\deliverAttachmentsAsZip(), ilPortfolioCertificateFileService\deliverCertificate(), ilFileVersionsTableGUI\fillRow(), ilWebDAVRepositoryHelper\getFilenameWithSanitizedFileExtension(), ilObjFileDAV\getName(), ilObjFileDAV\getPathToFile(), ilCertificateFileUtilsHelper\getValidFilename(), ilWebDAVObjDAVHelper\isValidFileNameWithValidFileExtension(), ILIAS\File\Sanitation\FilePathSanitizer\needsSanitation(), ILIAS\File\Sanitation\FilePathSanitizer\santitizeFilename(), assFileUpload\saveWorkingData(), ilObjFile\storeUnzipedFile(), ilFSStorageExercise\uploadFile(), ilExSubmission\uploadFile(), and ilBadgeImageTemplate\uploadImage().
Here is the caller graph for this function:
|
static |
| string | $a_filename |
Definition at line 864 of file class.ilFileUtils.php.
Referenced by ilObjFileGUI\uploadFiles().
Here is the caller graph for this function:
|
static |
| string | $content |
Definition at line 507 of file class.ilFileUtils.php.
Referenced by ilQtiMatImageSecurity\determineMimeType(), and lookupFileMimeType().
Here is the caller graph for this function:
|
static |
| string | $a_file |
Definition at line 520 of file class.ilFileUtils.php.
References lookupContentMimeType().
Referenced by _lookupMimeType().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
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 | |
| ilException |
Definition at line 62 of file class.ilFileUtils.php.
References ilFileUtilsException\$BROKEN_FILE, $DIC, ilFileUtilsException\$DOUBLETTES_FOUND, ilFileUtilsException\$INFECTED_FILE, $key, $lng, $tree, createObjects(), ilUtil\delDir(), recursive_dirscan(), ilUtil\unzip(), utf8_encode(), and ilUtil\virusHandling().
Referenced by ilCloudPluginUploadGUI\handleFileUpload(), ilExSubmission\processUploadedZipFile(), and ilObjFileGUI\saveUnzip().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
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 |
| ilFileUtilsException |
Definition at line 156 of file class.ilFileUtils.php.
References ilFileUtilsException\$BROKEN_FILE, $DIC, $lng, and recursive_dirscan().
Referenced by ilObjFileBasedLMGUI\afterSave(), ilSCORM13Package\dbImportSco(), ilObjSCORM2004LearningModule\exportPDF(), ilSCORM2004Asset\exportPDF(), ilObjTest\getCustomStyles(), ilExSubmission\processUploadedZipFile(), processZipFile(), recursive_dirscan(), ilUtil\unzip(), and ilFileSystemGUI\unzipFile().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Rename a file.
| $a_source | |
| $a_target |
| ilFileUtilsException |
Definition at line 881 of file class.ilFileUtils.php.
References rename().
Referenced by ilAssFileUploadUploadsExporter\createFileUploadCollectionZipFile(), ilScorm2004DataSet\getXmlRecord(), ilScorm2004DataSet\importRecord(), ilScormAiccImporter\importXmlRepresentation(), assFlashQuestion\moveAppletIfExists(), ilObjSCORMLearningModuleGUI\newModuleVersionUpload(), rename(), ilFileSystemGUI\renameFile(), ilFileXMLParser\setFileContents(), ilObjFile\storeUnzipedFile(), and ilObjSAHSLearningModuleGUI\uploadObject().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
utf8-encodes string if it is not a valid utf8-string.
| string | $string | String to encode |
Definition at line 363 of file class.ilFileUtils.php.
References utf8_encode().
Referenced by createFile(), createObjects(), ilSCORM13Package\dbImportSco(), ilExSubmission\processUploadedZipFile(), processZipFile(), and utf8_encode().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprotected |
Definition at line 44 of file class.ilFileUtils.php.
Referenced by getNewObjects().