ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
|
Public Member Functions | |
__construct (private int $storage_type, private bool $path_conversion, private int $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 |
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" |
Definition at line 27 of file class.ilFileSystemAbstractionStorage.php.
ilFileSystemAbstractionStorage::__construct | ( | private int | $storage_type, |
private bool | $path_conversion, | ||
private int | $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 48 of file class.ilFileSystemAbstractionStorage.php.
|
static |
Definition at line 238 of file class.ilFileSystemAbstractionStorage.php.
Referenced by ilFSStorageCourse\_clone().
ilFileSystemAbstractionStorage::appendToPath | ( | string | $a_appendix | ) |
Definition at line 270 of file class.ilFileSystemAbstractionStorage.php.
Referenced by ilFSStorageMail\__construct().
ilFileSystemAbstractionStorage::copyFile | ( | string | $a_from, |
string | $a_to | ||
) |
Definition at line 128 of file class.ilFileSystemAbstractionStorage.php.
ilFileSystemAbstractionStorage::create | ( | ) |
Reimplemented in ilIndividualAssessmentFileStorage, ilTestProcessLockFileStorage, and ilAssQuestionProcessLockFileStorage.
Definition at line 150 of file class.ilFileSystemAbstractionStorage.php.
References getFileSystemService(), and ILIAS\GlobalScreen\has().
Referenced by ilLearningSequenceFilesystem\__construct(), and ilRestFileStorage\init().
|
static |
Definition at line 87 of file class.ilFileSystemAbstractionStorage.php.
References $path.
Referenced by ilExerciseInstructionFilesMigration\buildAbsolutPath(), ilExerciseSampleSolutionMigration\buildAbsolutPath(), ilExercisePeerFeedbackMigration\buildAbsolutPath(), ilExerciseSubmissionMigration\buildAbsolutPath(), ilExerciseTutorFeedbackFileMigration\buildAbsolutPath(), ilExerciseTutorTeamFeedbackFileMigration\buildAbsolutPath(), ilBookingManagerBookingInfoMigration\buildAbsolutPath(), ilBookingManagerObjectInfoMigration\buildAbsolutPath(), ilPollImagesMigration\getLegacyPath(), init(), and ilExerciseManagementGUI\openSubmissionViewObject().
|
private |
Definition at line 285 of file class.ilFileSystemAbstractionStorage.php.
Referenced by deleteDirectory(), deleteFile(), and fileExists().
ilFileSystemAbstractionStorage::delete | ( | ) |
Definition at line 213 of file class.ilFileSystemAbstractionStorage.php.
References getAbsolutePath(), and getFileSystemService().
ilFileSystemAbstractionStorage::deleteDirectory | ( | string | $a_abs_name | ) |
Definition at line 224 of file class.ilFileSystemAbstractionStorage.php.
References $path, createRelativePathForFileSystem(), and getFileSystemService().
ilFileSystemAbstractionStorage::deleteFile | ( | string | $a_abs_name | ) |
Definition at line 231 of file class.ilFileSystemAbstractionStorage.php.
References $path, createRelativePathForFileSystem(), and getFileSystemService().
Referenced by ilIndividualAssessmentFileStorage\deleteAllFilesBut(), ilFSStorageCourse\deleteMemberExportFile(), ilFSStorageGroup\deleteMemberExportFile(), and ilFSStoragePRG\deleteMemberExportFile().
ilFileSystemAbstractionStorage::fileExists | ( | string | $a_absolute_path | ) |
Definition at line 57 of file class.ilFileSystemAbstractionStorage.php.
References createRelativePathForFileSystem(), and getFileSystemService().
Referenced by ilFSStorageCourse\hasMemberExportFile(), ilFSStorageGroup\hasMemberExportFile(), and ilFSStoragePRG\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. |
Reimplemented in ilIndividualAssessmentFileStorage.
Definition at line 166 of file class.ilFileSystemAbstractionStorage.php.
References getLegacyAbsolutePath().
Referenced by ilLearningSequenceFilesystem\__construct(), delete(), ilFSStorageCourse\getInfoDirectory(), ilFSStorageCourse\getMemberExportDirectory(), ilFSStorageGroup\getMemberExportDirectory(), ilFSStoragePRG\getMemberExportDirectory(), and ilFSStorageMail\getRelativePathExMailDirectory().
ilFileSystemAbstractionStorage::getContainerId | ( | ) |
Definition at line 82 of file class.ilFileSystemAbstractionStorage.php.
Referenced by ilFSStorageCourse\getMemberExportFiles(), ilFSStorageGroup\getMemberExportFiles(), and ilFSStoragePRG\getMemberExportFiles().
|
protected |
Definition at line 69 of file class.ilFileSystemAbstractionStorage.php.
References getStorageType(), SECURED_DIRECTORY, STORAGE_DATA, STORAGE_SECURED, and STORAGE_WEB.
Referenced by create(), ilTestProcessLockFileStorage\create(), ilAssQuestionProcessLockFileStorage\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 178 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 62 of file class.ilFileSystemAbstractionStorage.php.
References getFileSystemService().
ilFileSystemAbstractionStorage::getPath | ( | ) |
Reimplemented in ilAssQuestionProcessLockFileStorage.
Definition at line 280 of file class.ilFileSystemAbstractionStorage.php.
References $path.
Referenced by ilTestProcessLockFileStorage\create(), ilRestFileStorage\createFile(), ilRestFileStorage\deleteDeprecated(), ilRestFileStorage\getFile(), 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
Reimplemented in ilFSStorageBadge, ilFSStorageBadgeImageTemplate, ilFSStorageCourse, ilFSStorageFile, ilFSStorageGroup, ilIndividualAssessmentFileStorage, ilLearningSequenceFilesystem, ilFSStorageMail, ilFSStoragePRG, ilTestProcessLockFileStorage, ilAssQuestionProcessLockFileStorage, ilVerificationStorageFile, and ilRestFileStorage.
Referenced by init().
|
abstractprotected |
Get path prefix.
Prefix that will be prepended to the path No trailing slash. E.g ilFiles for files
Reimplemented in ilFSStorageBadge, ilFSStorageBadgeImageTemplate, ilFSStorageCourse, ilFSStorageFile, ilFSStorageGroup, ilIndividualAssessmentFileStorage, ilLearningSequenceFilesystem, ilFSStorageMail, ilFSStoragePRG, ilTestProcessLockFileStorage, ilAssQuestionProcessLockFileStorage, ilVerificationStorageFile, and ilRestFileStorage.
Referenced by init().
ilFileSystemAbstractionStorage::getStorageType | ( | ) |
Definition at line 275 of file class.ilFileSystemAbstractionStorage.php.
Referenced by getFileSystemService(), getLegacyAbsolutePath(), and ilFSStorageMail\getRelativePathExMailDirectory().
|
protected |
Reimplemented in ilRestFileStorage.
Definition at line 190 of file class.ilFileSystemAbstractionStorage.php.
References createPathFromId(), getPathPostfix(), getPathPrefix(), STORAGE_DATA, STORAGE_SECURED, and STORAGE_WEB.
Referenced by __construct().
ilFileSystemAbstractionStorage::writeToFile | ( | string | $a_data, |
$a_absolute_path | |||
) |
Definition at line 112 of file class.ilFileSystemAbstractionStorage.php.
Referenced by ilFSStorageCourse\addMemberExportFile(), ilFSStoragePRG\addMemberExportFile(), and ilFSStorageGroup\addMemberExportFile().
|
protected |
Definition at line 36 of file class.ilFileSystemAbstractionStorage.php.
|
protected |
Definition at line 35 of file class.ilFileSystemAbstractionStorage.php.
Referenced by ilRestFileStorage\createFile(), createPathFromId(), deleteDirectory(), deleteFile(), ilIndividualAssessmentFileStorage\getAbsolutePath(), getPath(), ilFSStorageMail\getRelativePathExMailDirectory(), ilAssQuestionProcessLockFileStorage\initSubPath(), ilRestFileStorage\storeFileForRest(), and ilIndividualAssessmentFileStorage\uploadFile().
|
private |
Definition at line 32 of file class.ilFileSystemAbstractionStorage.php.
|
private |
Definition at line 33 of file class.ilFileSystemAbstractionStorage.php.
|
private |
Definition at line 34 of file class.ilFileSystemAbstractionStorage.php.
Referenced by getFileSystemService().
const ilFileSystemAbstractionStorage::STORAGE_DATA = 2 |
Definition at line 30 of file class.ilFileSystemAbstractionStorage.php.
Referenced by ilRestFileStorage\__construct(), ilFSStorageCourse\__construct(), ilFSStorageGroup\__construct(), ilFSStoragePRG\__construct(), ilTestProcessLockFileStorage\__construct(), ilAssQuestionProcessLockFileStorage\__construct(), getFileSystemService(), ilFSStorageMail\getRelativePathExMailDirectory(), and init().
const ilFileSystemAbstractionStorage::STORAGE_SECURED = 3 |
Definition at line 31 of file class.ilFileSystemAbstractionStorage.php.
Referenced by getFileSystemService(), and init().
const ilFileSystemAbstractionStorage::STORAGE_WEB = 1 |
Definition at line 29 of file class.ilFileSystemAbstractionStorage.php.
Referenced by getFileSystemService(), ilIndividualAssessmentFileStorage\getInstance(), ilFSStorageMail\getRelativePathExMailDirectory(), and init().