Import directory interface.
More...
◆ getAbsolutePathForHash()
ilExportImportDirectory::getAbsolutePathForHash |
( |
int |
$user_id, |
|
|
string |
$type, |
|
|
string |
$post_hash |
|
) |
| |
- Parameters
-
int | $user_id | |
string | $type | |
string | $post_hash | |
- Returns
- string
Definition at line 96 of file class.ilExportImportDirectory.php.
References ilUtil\getDataDir(), and getFilesFor().
99 if (strcmp($hash, $post_hash) === 0) {
100 $file_path = base64_decode($hash);
getFilesFor(int $user_id, string $type)
static getDataDir()
get data directory (outside webspace)
◆ getFilesFor()
ilExportImportDirectory::getFilesFor |
( |
int |
$user_id, |
|
|
string |
$type |
|
) |
| |
- Parameters
-
- Returns
- array
Definition at line 39 of file class.ilExportImportDirectory.php.
References ilImportDirectory\exists(), ilImportDirectory\getRelativePath(), and matchesType().
Referenced by getAbsolutePathForHash(), and hasFilesFor().
44 $finder = $this->storage->finder()
50 foreach ($finder as $file) {
51 $basename = basename($file->getPath());
53 $files[base64_encode($file->getPath())] = $basename;
56 if ($this->storage->hasDir($this->getRelativePath() .
'/' . (string) $user_id)) {
57 $finder = $this->storage->finder()->in([$this->
getRelativePath() .
'/' . (
string) $user_id])
61 foreach ($finder as $file) {
62 $basename = basename($file->getPath());
64 $files[base64_encode($file->getPath())] = $basename;
matchesType(string $type, string $filename)
Check if filename matches a given type.
◆ getPathPrefix()
ilExportImportDirectory::getPathPrefix |
( |
| ) |
|
|
protected |
◆ hasFilesFor()
ilExportImportDirectory::hasFilesFor |
( |
int |
$user_id, |
|
|
string |
$type |
|
) |
| |
◆ matchesType()
ilExportImportDirectory::matchesType |
( |
string |
$type, |
|
|
string |
$filename |
|
) |
| |
|
protected |
◆ PATH_PREFIX
const ilExportImportDirectory::PATH_PREFIX = 'export' |
|
private |
The documentation for this class was generated from the following file: