ILIAS
release_8 Revision v8.23
|
Public Member Functions | |
__construct (int $a_storage_type, bool $a_path_conversion, int $a_container_id) | |
Constructor. More... | |
fileExists (string $a_absolute_path) | |
getContainerId () | |
writeToFile (string $a_data, $a_absolute_path) | |
copyFile (string $a_from, string $a_to) | |
create () | |
getAbsolutePath () | |
Calculates the full path on the filesystem. More... | |
delete () | |
deleteDirectory (string $a_abs_name) | |
deleteFile (string $a_abs_name) | |
appendToPath (string $a_appendix) | |
getStorageType () | |
getPath () | |
Static Public Member Functions | |
static | createPathFromId (int $a_container_id, string $a_name) |
static | _copyDirectory (string $a_sdir, string $a_tdir) |
Data Fields | |
const | STORAGE_WEB = 1 |
const | STORAGE_DATA = 2 |
const | STORAGE_SECURED = 3 |
Protected Member Functions | |
getLegacyFullAbsolutePath (string $relative_path) | |
getFileSystemService () | |
getPathPrefix () | |
Get path prefix. More... | |
getPathPostfix () | |
Get directory name. More... | |
getLegacyAbsolutePath () | |
Calculates the absolute filesystem storage location. More... | |
init () | |
Protected Attributes | |
string | $path = null |
ILIAS Filesystem Filesystems | $file_system_service |
Private Member Functions | |
createRelativePathForFileSystem (string $a_absolute_path) | |
Private Attributes | |
const | FACTOR = 100 |
const | MAX_EXPONENT = 3 |
const | SECURED_DIRECTORY = "sec" |
int | $container_id |
int | $storage_type |
bool | $path_conversion = false |
Definition at line 26 of file class.ilFileSystemAbstractionStorage.php.
ilFileSystemAbstractionStorage::__construct | ( | int | $a_storage_type, |
bool | $a_path_conversion, | ||
int | $a_container_id | ||
) |
Constructor.
$a_storage_type | int storage type |
$a_path_conversion | bool En/Disable automatic path conversion. If enabled files with id 123 will be stored in directory files/1/file_123 object id of container |
$a_container_id | int (e.g file_id or mob_id) |
Definition at line 50 of file class.ilFileSystemAbstractionStorage.php.
|
static |
Definition at line 243 of file class.ilFileSystemAbstractionStorage.php.
Referenced by ilFSStorageCourse\_clone(), and ilObjPortfolioBase\cloneBasics().
ilFileSystemAbstractionStorage::appendToPath | ( | string | $a_appendix | ) |
Definition at line 275 of file class.ilFileSystemAbstractionStorage.php.
Referenced by ilFSStorageMail\__construct().
ilFileSystemAbstractionStorage::copyFile | ( | string | $a_from, |
string | $a_to | ||
) |
Definition at line 133 of file class.ilFileSystemAbstractionStorage.php.
References getPathPostfix(), and getPathPrefix().
ilFileSystemAbstractionStorage::create | ( | ) |
Definition at line 155 of file class.ilFileSystemAbstractionStorage.php.
References getFileSystemService(), and ILIAS\GlobalScreen\has().
Referenced by ilLearningSequenceFilesystem\__construct(), ilExAssignment\cloneAssignmentsOfExercise(), ilExAssignmentEditorGUI\executeCommand(), ilExerciseDataSet\importRecord(), and ilRestFileStorage\init().
|
static |
Definition at line 92 of file class.ilFileSystemAbstractionStorage.php.
References $i.
|
private |
Definition at line 290 of file class.ilFileSystemAbstractionStorage.php.
References ILIAS\Filesystem\Util\LegacyPathHelper\createRelativePath().
Referenced by deleteDirectory(), deleteFile(), and fileExists().
ilFileSystemAbstractionStorage::delete | ( | ) |
Definition at line 218 of file class.ilFileSystemAbstractionStorage.php.
References Vendor\Package\$e, getAbsolutePath(), and getFileSystemService().
ilFileSystemAbstractionStorage::deleteDirectory | ( | string | $a_abs_name | ) |
Definition at line 229 of file class.ilFileSystemAbstractionStorage.php.
References createRelativePathForFileSystem(), and getFileSystemService().
Referenced by ilExcCriteriaFile\resetReview().
ilFileSystemAbstractionStorage::deleteFile | ( | string | $a_abs_name | ) |
Definition at line 236 of file class.ilFileSystemAbstractionStorage.php.
References createRelativePathForFileSystem(), and getFileSystemService().
Referenced by ilLearningSequenceFilesystem\delete_image(), ilIndividualAssessmentFileStorage\deleteAllFilesBut(), ilFSStorageGroup\deleteMemberExportFile(), and ilFSStorageCourse\deleteMemberExportFile().
ilFileSystemAbstractionStorage::fileExists | ( | string | $a_absolute_path | ) |
Definition at line 62 of file class.ilFileSystemAbstractionStorage.php.
References createRelativePathForFileSystem(), and getFileSystemService().
Referenced by ilFSStorageGroup\hasMemberExportFile(), and ilFSStorageCourse\hasMemberExportFile().
ilFileSystemAbstractionStorage::getAbsolutePath | ( | ) |
Calculates the full path on the filesystem.
This method is filesystem aware and will create the absolute path if it's not already existing.
IOException | Thrown if the absolute path could not be created. |
Definition at line 171 of file class.ilFileSystemAbstractionStorage.php.
References getLegacyAbsolutePath().
Referenced by ilLearningSequenceFilesystem\__construct(), ilExAssignment\cloneAssignmentsOfExercise(), ilFSStorageSession\createDirectory(), delete(), ilFSWebStorageExercise\getAssignmentFilePath(), ilFSStorageExercise\getAssignmentFilePath(), ilFSStorageCourse\getInfoDirectory(), ilFSStorageGroup\getMemberExportDirectory(), ilFSStorageCourse\getMemberExportDirectory(), ilFSStorageMail\getRelativePathExMailDirectory(), ilLearningSequenceFilesystem\getStoragePath(), ilFSStorageExercise\init(), ilFSWebStorageExercise\uploadAssignmentFiles(), and ilFSStorageExercise\uploadAssignmentFiles().
ilFileSystemAbstractionStorage::getContainerId | ( | ) |
Definition at line 87 of file class.ilFileSystemAbstractionStorage.php.
References $container_id.
Referenced by ilFSStorageGroup\getMemberExportFiles(), and ilFSStorageCourse\getMemberExportFiles().
|
protected |
Definition at line 74 of file class.ilFileSystemAbstractionStorage.php.
References getStorageType().
Referenced by ilTestProcessLockFileStorage\create(), ilAssQuestionProcessLockFileStorage\create(), create(), delete(), deleteDirectory(), deleteFile(), fileExists(), getLegacyAbsolutePath(), and getLegacyFullAbsolutePath().
|
protected |
Calculates the absolute filesystem storage location.
IOException | Thrown if the directory could not be created. |
Definition at line 183 of file class.ilFileSystemAbstractionStorage.php.
References CLIENT_DATA_DIR, CLIENT_WEB_DIR, getFileSystemService(), getStorageType(), and ILIAS\GlobalScreen\has().
Referenced by getAbsolutePath().
|
protected |
Definition at line 67 of file class.ilFileSystemAbstractionStorage.php.
References getFileSystemService().
ilFileSystemAbstractionStorage::getPath | ( | ) |
Definition at line 285 of file class.ilFileSystemAbstractionStorage.php.
References $path.
Referenced by ilTestProcessLockFileStorage\create(), ilRestFileStorage\createFile(), ilRestFileStorage\deleteDeprecated(), ilRestFileStorage\getFile(), ilFSWebStorageExercise\getFiles(), ilRestFileStorage\getStoredFilePath(), and ilRestFileStorage\storeFileForRest().
|
abstractprotected |
Get directory name.
E.g for files => file Only relative path, no trailing slash '_<obj_id>' will be appended automatically
Referenced by copyFile(), and init().
|
abstractprotected |
Get path prefix.
Prefix that will be prepended to the path No trailing slash. E.g ilFiles for files
Referenced by copyFile(), and init().
ilFileSystemAbstractionStorage::getStorageType | ( | ) |
Definition at line 280 of file class.ilFileSystemAbstractionStorage.php.
References $storage_type.
Referenced by getFileSystemService(), getLegacyAbsolutePath(), and ilFSStorageMail\getRelativePathExMailDirectory().
|
protected |
Definition at line 195 of file class.ilFileSystemAbstractionStorage.php.
References $container_id, getPathPostfix(), and getPathPrefix().
Referenced by __construct().
ilFileSystemAbstractionStorage::writeToFile | ( | string | $a_data, |
$a_absolute_path | |||
) |
Definition at line 117 of file class.ilFileSystemAbstractionStorage.php.
Referenced by ilFSStorageGroup\addMemberExportFile(), and ilFSStorageCourse\addMemberExportFile().
|
private |
Definition at line 34 of file class.ilFileSystemAbstractionStorage.php.
Referenced by getContainerId(), ilIndividualAssessmentFileStorage\getInstance(), and init().
|
protected |
Definition at line 38 of file class.ilFileSystemAbstractionStorage.php.
|
protected |
Definition at line 37 of file class.ilFileSystemAbstractionStorage.php.
Referenced by ilRestFileStorage\createFile(), ilIndividualAssessmentFileStorage\getAbsolutePath(), ilFSStorageExercise\getFeedbackPath(), ilFSWebStorageExercise\getFiles(), ilFSStorageExercise\getGlobalFeedbackPath(), ilFSStorageExercise\getMultiFeedbackUploadPath(), getPath(), ilFSStorageExercise\getPeerReviewUploadPath(), ilFSStorageMail\getRelativePathExMailDirectory(), ilAssQuestionProcessLockFileStorage\initSubPath(), ilRestFileStorage\storeFileForRest(), and ilIndividualAssessmentFileStorage\uploadFile().
|
private |
Definition at line 36 of file class.ilFileSystemAbstractionStorage.php.
|
private |
Definition at line 35 of file class.ilFileSystemAbstractionStorage.php.
Referenced by getStorageType().
|
private |
Definition at line 31 of file class.ilFileSystemAbstractionStorage.php.
|
private |
Definition at line 32 of file class.ilFileSystemAbstractionStorage.php.
|
private |
Definition at line 33 of file class.ilFileSystemAbstractionStorage.php.
const ilFileSystemAbstractionStorage::STORAGE_DATA = 2 |
Definition at line 29 of file class.ilFileSystemAbstractionStorage.php.
Referenced by ilRestFileStorage\__construct(), ilTestProcessLockFileStorage\__construct(), ilAssQuestionProcessLockFileStorage\__construct(), ilFSStorageSession\__construct(), ilFSStorageCourse\__construct(), and ilFSStorageGroup\__construct().
const ilFileSystemAbstractionStorage::STORAGE_SECURED = 3 |
Definition at line 30 of file class.ilFileSystemAbstractionStorage.php.
const ilFileSystemAbstractionStorage::STORAGE_WEB = 1 |
Definition at line 28 of file class.ilFileSystemAbstractionStorage.php.