ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Public Member Functions | |
__construct ($a_storage_type, $a_path_conversion, $a_container_id) | |
Constructor. More... | |
fileExists ($a_absolute_path) | |
getContainerId () | |
create () | |
Create directory. More... | |
getAbsolutePath () | |
Calculates the full path on the filesystem. More... | |
writeToFile ($a_data, $a_absolute_path) | |
deleteFile ($a_absolute_path) | |
deleteDirectory ($a_absolute_path) | |
delete () | |
copyFile ($a_from, $a_to) | |
appendToPath ($a_appendix) | |
getStorageType () | |
getPath () | |
Static Public Member Functions | |
static | _createPathFromId ($a_container_id, $a_name) |
Create a path from an id: e.g 12345 will be converted to 12/34/<name>_5. More... | |
static | _copyDirectory ($a_sdir, $a_tdir) |
Data Fields | |
const | STORAGE_WEB = 1 |
const | STORAGE_DATA = 2 |
const | STORAGE_SECURED = 3 |
const | FACTOR = 100 |
const | MAX_EXPONENT = 3 |
const | SECURED_DIRECTORY = "sec" |
Protected Member Functions | |
getLegacyFullAbsolutePath ($relative_path) | |
getFileSystemService () | |
getPathPrefix () | |
Get path prefix. More... | |
getPathPostfix () | |
Get directory name. More... | |
getLegacyAbsolutePath () | |
Calculates the absolute filesystem storage location. More... | |
init () | |
Read path info. More... | |
Protected Attributes | |
$path | |
Private Member Functions | |
createRelativePathForFileSystem ($a_absolute_path) | |
Private Attributes | |
$container_id | |
$storage_type | |
$path_conversion = false | |
Definition at line 35 of file class.ilFileSystemAbstractionStorage.php.
ilFileSystemAbstractionStorage::__construct | ( | $a_storage_type, | |
$a_path_conversion, | |||
$a_container_id | |||
) |
Constructor.
public
int | storage type |
bool | En/Disable automatic path conversion. If enabled files with id 123 will be stored in directory files/1/file_123 |
int | object id of container (e.g file_id or mob_id) |
Definition at line 65 of file class.ilFileSystemAbstractionStorage.php.
References init().
|
static |
$a_sdir | |
$a_tdir |
Definition at line 364 of file class.ilFileSystemAbstractionStorage.php.
References GuzzleHttp\Psr7\$stream.
|
static |
Create a path from an id: e.g 12345 will be converted to 12/34/<name>_5.
$a_container_id | |
$a_name |
Definition at line 134 of file class.ilFileSystemAbstractionStorage.php.
References $i, $path, array, getPathPostfix(), and getPathPrefix().
ilFileSystemAbstractionStorage::appendToPath | ( | $a_appendix | ) |
string | $a_appendix |
Definition at line 400 of file class.ilFileSystemAbstractionStorage.php.
ilFileSystemAbstractionStorage::copyFile | ( | $a_from, | |
$a_to | |||
) |
$a_from | |
$a_to |
Definition at line 342 of file class.ilFileSystemAbstractionStorage.php.
References createRelativePathForFileSystem(), and getFileSystemService().
ilFileSystemAbstractionStorage::create | ( | ) |
Create directory.
public
Definition at line 188 of file class.ilFileSystemAbstractionStorage.php.
References getFileSystemService().
|
private |
$a_absolute_path |
Definition at line 429 of file class.ilFileSystemAbstractionStorage.php.
References ILIAS\Filesystem\Util\LegacyPathHelper\createRelativePath().
Referenced by copyFile(), deleteDirectory(), deleteFile(), fileExists(), and writeToFile().
ilFileSystemAbstractionStorage::delete | ( | ) |
Definition at line 324 of file class.ilFileSystemAbstractionStorage.php.
References getAbsolutePath(), and getFileSystemService().
ilFileSystemAbstractionStorage::deleteDirectory | ( | $a_absolute_path | ) |
$a_absolute_path |
Definition at line 306 of file class.ilFileSystemAbstractionStorage.php.
References createRelativePathForFileSystem(), and getFileSystemService().
ilFileSystemAbstractionStorage::deleteFile | ( | $a_absolute_path | ) |
$a_absolute_path |
Definition at line 286 of file class.ilFileSystemAbstractionStorage.php.
References createRelativePathForFileSystem(), and getFileSystemService().
ilFileSystemAbstractionStorage::fileExists | ( | $a_absolute_path | ) |
$a_absolute_path |
Definition at line 81 of file class.ilFileSystemAbstractionStorage.php.
References createRelativePathForFileSystem(), and getFileSystemService().
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 207 of file class.ilFileSystemAbstractionStorage.php.
References getLegacyAbsolutePath().
Referenced by delete().
ilFileSystemAbstractionStorage::getContainerId | ( | ) |
Definition at line 120 of file class.ilFileSystemAbstractionStorage.php.
References $container_id.
|
protected |
Definition at line 105 of file class.ilFileSystemAbstractionStorage.php.
References $DIC, and getStorageType().
Referenced by copyFile(), create(), delete(), deleteDirectory(), deleteFile(), fileExists(), getLegacyAbsolutePath(), getLegacyFullAbsolutePath(), and writeToFile().
|
protected |
Calculates the absolute filesystem storage location.
IOException | Thrown if the directory could not be created. |
Definition at line 220 of file class.ilFileSystemAbstractionStorage.php.
References $path, getFileSystemService(), and getStorageType().
Referenced by getAbsolutePath().
|
protected |
$relative_path |
Definition at line 94 of file class.ilFileSystemAbstractionStorage.php.
References GuzzleHttp\Psr7\$stream, and getFileSystemService().
ilFileSystemAbstractionStorage::getPath | ( | ) |
Definition at line 418 of file class.ilFileSystemAbstractionStorage.php.
References $path.
|
abstractprotected |
Get directory name.
E.g for files => file Only relative path, no trailing slash '_<obj_id>' will be appended automatically
protected
Referenced by _createPathFromId(), and init().
|
abstractprotected |
Get path prefix.
Prefix that will be prepended to the path No trailing slash. E.g ilFiles for files
protected
Referenced by _createPathFromId(), and init().
ilFileSystemAbstractionStorage::getStorageType | ( | ) |
Definition at line 409 of file class.ilFileSystemAbstractionStorage.php.
References $storage_type.
Referenced by getFileSystemService(), and getLegacyAbsolutePath().
|
protected |
Read path info.
private
Definition at line 238 of file class.ilFileSystemAbstractionStorage.php.
References $container_id, getPathPostfix(), and getPathPrefix().
Referenced by __construct().
ilFileSystemAbstractionStorage::writeToFile | ( | $a_data, | |
$a_absolute_path | |||
) |
$a_data | |
$a_absolute_path |
Definition at line 268 of file class.ilFileSystemAbstractionStorage.php.
References createRelativePathForFileSystem(), and getFileSystemService().
|
private |
Definition at line 43 of file class.ilFileSystemAbstractionStorage.php.
Referenced by getContainerId(), and init().
|
protected |
Definition at line 46 of file class.ilFileSystemAbstractionStorage.php.
Referenced by _createPathFromId(), getLegacyAbsolutePath(), and getPath().
|
private |
Definition at line 45 of file class.ilFileSystemAbstractionStorage.php.
|
private |
Definition at line 44 of file class.ilFileSystemAbstractionStorage.php.
Referenced by getStorageType().
const ilFileSystemAbstractionStorage::FACTOR = 100 |
Definition at line 40 of file class.ilFileSystemAbstractionStorage.php.
const ilFileSystemAbstractionStorage::MAX_EXPONENT = 3 |
Definition at line 41 of file class.ilFileSystemAbstractionStorage.php.
const ilFileSystemAbstractionStorage::SECURED_DIRECTORY = "sec" |
Definition at line 42 of file class.ilFileSystemAbstractionStorage.php.
const ilFileSystemAbstractionStorage::STORAGE_DATA = 2 |
Definition at line 38 of file class.ilFileSystemAbstractionStorage.php.
const ilFileSystemAbstractionStorage::STORAGE_SECURED = 3 |
Definition at line 39 of file class.ilFileSystemAbstractionStorage.php.
const ilFileSystemAbstractionStorage::STORAGE_WEB = 1 |
Definition at line 37 of file class.ilFileSystemAbstractionStorage.php.