ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilFileDataMail Class Reference
+ Inheritance diagram for ilFileDataMail:
+ Collaboration diagram for ilFileDataMail:

Public Member Functions

 __construct (public int $user_id=0)
 
 initDirectory ()
 
 getUploadLimit ()
 
 getAttachmentsTotalSizeLimit ()
 
 getMailPath ()
 
 getAbsoluteAttachmentPoolPathPrefix ()
 
 getAttachmentPathAndFilenameByMd5Hash (string $md5FileHash, int $mail_id)
 
 getAttachmentPath (string $a_filename, int $a_mail_id)
 
 adoptAttachments (array $a_attachments, int $a_mail_id)
 
 checkReadWrite ()
 
 getUserFilesData ()
 
 storeAsAttachment (string $a_filename, string $a_content)
 
 storeUploadedFile (array $file)
 
 copyAttachmentFile (string $a_abs_path, string $a_new_name)
 
 unlinkFiles (array $a_filenames)
 
 unlinkFile (string $a_filename)
 
 getAbsoluteAttachmentPoolPathByFilename (string $filename)
 Resolves a path for a passed filename in regards of a user's mail attachment pool, meaning attachments not being sent. More...
 
 saveFiles (int $a_mail_id, array $a_attachments)
 Saves all attachment files in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/... More...
 
 saveFile (int $a_mail_id, string $a_attachment)
 Save attachment file in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/... More...
 
 checkFilesExist (array $a_files)
 
 assignAttachmentsToDirectory (int $a_mail_id, int $a_sent_mail_id)
 
 deassignAttachmentFromDirectory (int $a_mail_id)
 
 deliverAttachmentsAsZip (string $basename, int $mail_id, array $files=[], bool $is_draft=false)
 
- Public Member Functions inherited from ilFileData
 __construct ()
 
 checkPath (string $a_path)
 
 getPath ()
 
- Public Member Functions inherited from ilFile
 deleteTrailingSlash (string $a_path)
 delete trailing slash of path variables More...
 

Static Public Member Functions

static getStorage (int $a_mail_id, int $a_usr_id)
 

Data Fields

string $mail_path
 

Protected Member Functions

 initAttachmentMaxUploadSize ()
 

Protected Attributes

int $mail_max_upload_file_size
 
Filesystem $tmp_directory
 
Filesystem $storage_directory
 
ilDBInterface $db
 
ILIAS $ilias
 
- Protected Attributes inherited from ilFile
string $path
 

Private Member Functions

 getAttachmentPathByMailId (int $mail_id)
 
 rotateFiles (string $a_path)
 
 deleteAttachmentDirectory (string $a_rel_path)
 

Detailed Description

Definition at line 24 of file class.ilFileDataMail.php.

Constructor & Destructor Documentation

◆ __construct()

ilFileDataMail::__construct ( public int  $user_id = 0)

Definition at line 33 of file class.ilFileDataMail.php.

34 {
35 global $DIC;
36
37 if (!defined('MAILPATH')) {
38 define('MAILPATH', 'mail');
39 }
41 $this->mail_path = $this->getPath() . '/' . MAILPATH;
42 $this->ilias = $DIC['ilias'];
43 $this->db = $DIC->database();
44 $this->tmp_directory = $DIC->filesystem()->temp();
45 $this->storage_directory = $DIC->filesystem()->storage();
46
47 $this->checkReadWrite();
49 }
const MAILPATH
Definition: constants.php:50
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ilObjForumAdministration.
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), checkReadWrite(), ilFileData\getPath(), initAttachmentMaxUploadSize(), and MAILPATH.

+ Here is the call graph for this function:

Member Function Documentation

◆ adoptAttachments()

ilFileDataMail::adoptAttachments ( array  $a_attachments,
int  $a_mail_id 
)
Parameters
list<string>$a_attachments

Definition at line 150 of file class.ilFileDataMail.php.

150 : string
151 {
152 foreach ($a_attachments as $file) {
153 $path = $this->getAttachmentPath($file, $a_mail_id);
154 if (!copy($path, $this->getMailPath() . '/' . $this->user_id . '_' . $file)) {
155 return 'ERROR: ' . $this->getMailPath() . '/' . $this->user_id . '_' . $file . ' cannot be created';
156 }
157 }
158
159 return '';
160 }
getAttachmentPath(string $a_filename, int $a_mail_id)
string $path

References ilFile\$path, getAttachmentPath(), and getMailPath().

+ Here is the call graph for this function:

◆ assignAttachmentsToDirectory()

ilFileDataMail::assignAttachmentsToDirectory ( int  $a_mail_id,
int  $a_sent_mail_id 
)

Definition at line 379 of file class.ilFileDataMail.php.

379 : void
380 {
381 $storage = self::getStorage($a_sent_mail_id, $this->user_id);
382 $this->db->manipulateF(
383 '
384 INSERT INTO mail_attachment
385 ( mail_id, path) VALUES (%s, %s)',
386 ['integer', 'text'],
387 [$a_mail_id, $storage->getRelativePathExMailDirectory()]
388 );
389 }
static getStorage(int $a_mail_id, int $a_usr_id)

References getStorage().

+ Here is the call graph for this function:

◆ checkFilesExist()

ilFileDataMail::checkFilesExist ( array  $a_files)
Parameters
list<string>$a_files

Definition at line 366 of file class.ilFileDataMail.php.

366 : bool
367 {
368 if ($a_files !== []) {
369 foreach ($a_files as $file) {
370 if (!is_file($this->mail_path . '/' . $this->user_id . '_' . $file)) {
371 return false;
372 }
373 }
374 }
375
376 return true;
377 }

◆ checkReadWrite()

ilFileDataMail::checkReadWrite ( )

Definition at line 162 of file class.ilFileDataMail.php.

162 : bool
163 {
164 if (is_writable($this->mail_path) && is_readable($this->mail_path)) {
165 return true;
166 }
167
168 $this->ilias->raiseError(
169 'Mail directory is not readable/writable by webserver: ' .
170 $this->mail_path,
171 $this->ilias->error_obj->FATAL
172 );
173
174 return false;
175 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ copyAttachmentFile()

ilFileDataMail::copyAttachmentFile ( string  $a_abs_path,
string  $a_new_name 
)

Definition at line 271 of file class.ilFileDataMail.php.

271 : bool
272 {
273 @copy($a_abs_path, $this->getMailPath() . '/' . $this->user_id . '_' . $a_new_name);
274
275 return true;
276 }

References getMailPath().

+ Here is the call graph for this function:

◆ deassignAttachmentFromDirectory()

ilFileDataMail::deassignAttachmentFromDirectory ( int  $a_mail_id)

Definition at line 391 of file class.ilFileDataMail.php.

391 : bool
392 {
393 $res = $this->db->query(
394 'SELECT path FROM mail_attachment WHERE mail_id = ' . $this->db->quote($a_mail_id, 'integer')
395 );
396
397 $path = '';
398 while ($row = $this->db->fetchObject($res)) {
399 $path = (string) $row->path;
400 }
401
402 if ($path !== '') {
403 $res = $this->db->query(
404 'SELECT COUNT(mail_id) count_mail_id FROM mail_attachment WHERE path = ' .
405 $this->db->quote($path, 'text')
406 ) ;
407
408 $cnt_mail_id = 0;
409 while ($row = $this->db->fetchObject($res)) {
410 $cnt_mail_id = (int) $row->count_mail_id;
411 }
412
413 if ($cnt_mail_id === 1) {
415 }
416 }
417
418 $this->db->manipulateF(
419 'DELETE FROM mail_attachment WHERE mail_id = %s',
420 ['integer'],
421 [$a_mail_id]
422 );
423
424 return true;
425 }
deleteAttachmentDirectory(string $a_rel_path)
$res
Definition: ltiservices.php:69

References ilFile\$path, $res, deleteAttachmentDirectory(), and ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ deleteAttachmentDirectory()

ilFileDataMail::deleteAttachmentDirectory ( string  $a_rel_path)
private

Definition at line 427 of file class.ilFileDataMail.php.

427 : void
428 {
429 ilFileUtils::delDir($this->mail_path . '/' . $a_rel_path);
430 }
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively

References ilFileUtils\delDir().

Referenced by deassignAttachmentFromDirectory().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deliverAttachmentsAsZip()

ilFileDataMail::deliverAttachmentsAsZip ( string  $basename,
int  $mail_id,
array  $files = [],
bool  $is_draft = false 
)
Parameters
list<string>$files

Definition at line 545 of file class.ilFileDataMail.php.

550 : void {
551 $path = '';
552 if (!$is_draft) {
553 $path = $this->getAttachmentPathByMailId($mail_id);
554 if ($path === '') {
555 throw new ilMailException('mail_download_zip_no_attachments');
556 }
557 }
558
559 $download_filename = ilFileUtils::getASCIIFilename($basename);
560 if ($download_filename === '') {
561 $download_filename = 'attachments';
562 }
563
564 $processing_directory = ilFileUtils::ilTempnam();
565 $relative_processing_directory = basename($processing_directory);
566
567 $absolute_zip_directory = $processing_directory . '/' . $download_filename;
568 $relative_zip_directory = $relative_processing_directory . '/' . $download_filename;
569
570 $this->tmp_directory->createDir($relative_zip_directory);
571
572 foreach ($files as $filename) {
573 if ($is_draft) {
574 $source = str_replace(
575 $this->mail_path,
576 MAILPATH,
578 );
579 } else {
580 $source = MAILPATH . '/' . $path . '/' . $filename;
581 }
582
583 $source = str_replace('//', '/', $source);
584 if (!$this->storage_directory->has($source)) {
585 continue;
586 }
587
588 $target = $relative_zip_directory . '/' . $filename;
589
590 $stream = $this->storage_directory->readStream($source);
591 $this->tmp_directory->writeStream($target, $stream);
592 }
593
594 $path_to_zip_file = $processing_directory . '/' . $download_filename . '.zip';
595 ilFileUtils::zip($absolute_zip_directory, $path_to_zip_file);
596
597 $this->tmp_directory->deleteDir($relative_zip_directory);
598
600 $processing_directory . '/' . $download_filename . '.zip',
601 ilFileUtils::getValidFilename($download_filename . '.zip')
602 );
603 }
$filename
Definition: buildRTE.php:78
getAttachmentPathByMailId(int $mail_id)
getAbsoluteAttachmentPoolPathByFilename(string $filename)
Resolves a path for a passed filename in regards of a user's mail attachment pool,...
static deliverFileAttached(string $path_to_file, ?string $download_file_name=null, ?string $mime_type=null, bool $delete_file=false)
static getASCIIFilename(string $a_filename)
static zip(string $a_dir, string $a_file, bool $compress_content=false)
static ilTempnam(?string $a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
static getValidFilename(string $a_filename)

References ilFile\$path, and getAttachmentPathByMailId().

+ Here is the call graph for this function:

◆ getAbsoluteAttachmentPoolPathByFilename()

ilFileDataMail::getAbsoluteAttachmentPoolPathByFilename ( string  $filename)

Resolves a path for a passed filename in regards of a user's mail attachment pool, meaning attachments not being sent.

Definition at line 315 of file class.ilFileDataMail.php.

315 : string
316 {
318 }

References $filename, and getAbsoluteAttachmentPoolPathPrefix().

+ Here is the call graph for this function:

◆ getAbsoluteAttachmentPoolPathPrefix()

ilFileDataMail::getAbsoluteAttachmentPoolPathPrefix ( )

Definition at line 83 of file class.ilFileDataMail.php.

83 : string
84 {
85 return $this->mail_path . '/' . $this->user_id . '_';
86 }

Referenced by getAbsoluteAttachmentPoolPathByFilename().

+ Here is the caller graph for this function:

◆ getAttachmentPath()

ilFileDataMail::getAttachmentPath ( string  $a_filename,
int  $a_mail_id 
)

Definition at line 136 of file class.ilFileDataMail.php.

136 : string
137 {
138 $path = $this->getMailPath() . '/' . $this->getAttachmentPathByMailId($a_mail_id) . '/' . $a_filename;
139
140 if (is_readable($path)) {
141 return $path;
142 }
143
144 return '';
145 }

References ilFile\$path, getAttachmentPathByMailId(), and getMailPath().

Referenced by adoptAttachments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAttachmentPathAndFilenameByMd5Hash()

ilFileDataMail::getAttachmentPathAndFilenameByMd5Hash ( string  $md5FileHash,
int  $mail_id 
)
Returns
array{path: string, filename: string} An array containing 'path' and 'filename' for the passed MD5 hash
Exceptions
OutOfBoundsException

Definition at line 92 of file class.ilFileDataMail.php.

92 : array
93 {
94 $res = $this->db->queryF(
95 'SELECT path FROM mail_attachment WHERE mail_id = %s',
96 ['integer'],
97 [$mail_id]
98 );
99
100 if ($this->db->numRows($res) !== 1) {
101 throw new OutOfBoundsException();
102 }
103
104 $row = $this->db->fetchAssoc($res);
105
106 $relative_path = $row['path'];
107 $path = $this->getMailPath() . '/' . $row['path'];
108
109 $files = ilFileUtils::getDir($path);
110 foreach ($files as $file) {
111 if ($file['type'] === 'file' && md5($file['entry']) === $md5FileHash) {
112 return [
113 'path' => $this->getMailPath() . '/' . $relative_path . '/' . $file['entry'],
114 'filename' => $file['entry'],
115 ];
116 }
117 }
118
119 throw new OutOfBoundsException();
120 }
static getDir(string $a_dir, bool $a_rec=false, ?string $a_sub_dir="")
get directory

References ilFile\$path, $res, ilFileUtils\getDir(), and getMailPath().

+ Here is the call graph for this function:

◆ getAttachmentPathByMailId()

ilFileDataMail::getAttachmentPathByMailId ( int  $mail_id)
private

Definition at line 123 of file class.ilFileDataMail.php.

123 : string
124 {
125 $query = $this->db->query(
126 'SELECT path FROM mail_attachment WHERE mail_id = ' . $this->db->quote($mail_id, 'integer')
127 );
128
129 while ($row = $this->db->fetchObject($query)) {
130 return $row->path;
131 }
132
133 return '';
134 }

Referenced by deliverAttachmentsAsZip(), and getAttachmentPath().

+ Here is the caller graph for this function:

◆ getAttachmentsTotalSizeLimit()

ilFileDataMail::getAttachmentsTotalSizeLimit ( )

Definition at line 68 of file class.ilFileDataMail.php.

68 : ?float
69 {
70 $max_size = $this->ilias->getSetting('mail_maxsize_attach', '');
71 if ($max_size === '') {
72 return null;
73 }
74
75 return (float) $this->ilias->getSetting('mail_maxsize_attach', '0') * 1024;
76 }

◆ getMailPath()

ilFileDataMail::getMailPath ( )

Definition at line 78 of file class.ilFileDataMail.php.

78 : string
79 {
80 return $this->mail_path;
81 }

References $mail_path.

Referenced by adoptAttachments(), copyAttachmentFile(), getAttachmentPath(), getAttachmentPathAndFilenameByMd5Hash(), storeAsAttachment(), and storeUploadedFile().

+ Here is the caller graph for this function:

◆ getStorage()

static ilFileDataMail::getStorage ( int  $a_mail_id,
int  $a_usr_id 
)
static

Definition at line 335 of file class.ilFileDataMail.php.

336 {
337 static $fsstorage_cache = [];
338
339 $fsstorage_cache[$a_mail_id][$a_usr_id] = new ilFSStorageMail($a_mail_id, $a_usr_id);
340
341 return $fsstorage_cache[$a_mail_id][$a_usr_id];
342 }

Referenced by assignAttachmentsToDirectory(), and saveFile().

+ Here is the caller graph for this function:

◆ getUploadLimit()

ilFileDataMail::getUploadLimit ( )

Definition at line 63 of file class.ilFileDataMail.php.

63 : int
64 {
66 }

References $mail_max_upload_file_size.

Referenced by storeAsAttachment().

+ Here is the caller graph for this function:

◆ getUserFilesData()

ilFileDataMail::getUserFilesData ( )
Returns
list<array{name: string, size: int, ctime: int}>

Definition at line 180 of file class.ilFileDataMail.php.

180 : array
181 {
182 return $this->getUnsentFiles();
183 }

◆ initAttachmentMaxUploadSize()

ilFileDataMail::initAttachmentMaxUploadSize ( )
protected
Todo:
mjansen: Unfortunately we cannot reuse the implementation of ilFileInputGUI

Definition at line 432 of file class.ilFileDataMail.php.

432 : void
433 {
436 // Copy of ilFileInputGUI: begin
437 // get the value for the maximal uploadable filesize from the php.ini (if available)
438 $umf = ini_get('upload_max_filesize');
439 // get the value for the maximal post data from the php.ini (if available)
440 $pms = ini_get('post_max_size');
441
442 //convert from short-string representation to "real" bytes
443 $multiplier_a = ['K' => 1024, 'M' => 1024 * 1024, 'G' => 1024 * 1024 * 1024];
444
445 $umf_parts = preg_split(
446 "/(\d+)([K|G|M])/",
447 (string) $umf,
448 -1,
449 PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY
450 );
451 $pms_parts = preg_split(
452 "/(\d+)([K|G|M])/",
453 (string) $pms,
454 -1,
455 PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY
456 );
457
458 if ((is_countable($umf_parts) ? count($umf_parts) : 0) === 2) {
459 $umf = (float) $umf_parts[0] * $multiplier_a[$umf_parts[1]];
460 }
461 if ((is_countable($pms_parts) ? count($pms_parts) : 0) === 2) {
462 $pms = (float) $pms_parts[0] * $multiplier_a[$pms_parts[1]];
463 }
464
465 // use the smaller one as limit
466 $max_filesize = min($umf, $pms);
467
468 if (!$max_filesize) {
469 $max_filesize = max($umf, $pms);
470 }
471
472 $this->mail_max_upload_file_size = (int) $max_filesize;
473 }
PREG_SPLIT_NO_EMPTY PREG_SPLIT_DELIM_CAPTURE

References ILIAS\Repository\int(), and PREG_SPLIT_DELIM_CAPTURE.

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initDirectory()

ilFileDataMail::initDirectory ( )

Definition at line 51 of file class.ilFileDataMail.php.

51 : bool
52 {
53 if (is_writable($this->getPath())
54 && mkdir($this->getPath() . '/' . MAILPATH)
55 && chmod($this->getPath() . '/' . MAILPATH, 0755)) {
56 $this->mail_path = $this->getPath() . '/' . MAILPATH;
57 return true;
58 }
59
60 return false;
61 }

References ilFileData\getPath(), and MAILPATH.

+ Here is the call graph for this function:

◆ rotateFiles()

ilFileDataMail::rotateFiles ( string  $a_path)
private

Definition at line 278 of file class.ilFileDataMail.php.

278 : bool
279 {
280 if (is_file($a_path)) {
281 $this->rotateFiles($a_path . '.old');
282 return ilFileUtils::rename($a_path, $a_path . '.old');
283 }
284
285 return true;
286 }
rotateFiles(string $a_path)
static rename(string $a_source, string $a_target)

References ilFileUtils\rename(), and rotateFiles().

Referenced by rotateFiles(), storeAsAttachment(), and storeUploadedFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveFile()

ilFileDataMail::saveFile ( int  $a_mail_id,
string  $a_attachment 
)

Save attachment file in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/...

Definition at line 347 of file class.ilFileDataMail.php.

347 : bool
348 {
349 $storage = self::getStorage($a_mail_id, $this->user_id);
350 $storage->create();
351 $storage_directory = $storage->getAbsolutePath();
352
353 if (!is_dir($storage_directory)) {
354 return false;
355 }
356
357 return copy(
358 $this->mail_path . '/' . $this->user_id . '_' . $a_attachment,
359 $storage_directory . '/' . $a_attachment
360 );
361 }
Filesystem $storage_directory

References $storage_directory, and getStorage().

Referenced by saveFiles().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveFiles()

ilFileDataMail::saveFiles ( int  $a_mail_id,
array  $a_attachments 
)

Saves all attachment files in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>/...

Parameters
list<string>$a_attachments

Definition at line 324 of file class.ilFileDataMail.php.

324 : void
325 {
326 if (!is_numeric($a_mail_id) || $a_mail_id < 1) {
327 throw new InvalidArgumentException('The passed mail_id must be a valid integer!');
328 }
329
330 foreach ($a_attachments as $attachment) {
331 $this->saveFile($a_mail_id, $attachment);
332 }
333 }
saveFile(int $a_mail_id, string $a_attachment)
Save attachment file in a specific mail directory .../mail/<calculated_path>/mail_<mail_id>_<user_id>...

References saveFile().

+ Here is the call graph for this function:

◆ storeAsAttachment()

ilFileDataMail::storeAsAttachment ( string  $a_filename,
string  $a_content 
)

Definition at line 212 of file class.ilFileDataMail.php.

212 : string
213 {
214 if (strlen($a_content) >= $this->getUploadLimit()) {
215 throw new DomainException(
216 sprintf(
217 'Mail upload limit reached for user with id %s',
218 $this->user_id
219 )
220 );
221 }
222
223 $name = ilFileUtils::_sanitizeFilemame($a_filename);
224 $this->rotateFiles($this->getMailPath() . '/' . $this->user_id . '_' . $name);
225
226 $abs_path = $this->getMailPath() . '/' . $this->user_id . '_' . $name;
227
228 $fp = fopen($abs_path, 'wb+');
229 if (!is_resource($fp)) {
230 throw new RuntimeException(
231 sprintf(
232 'Could not read file: %s',
233 $abs_path
234 )
235 );
236 }
237
238 if (fwrite($fp, $a_content) === false) {
239 fclose($fp);
240 throw new RuntimeException(
241 sprintf(
242 'Could not write file: %s',
243 $abs_path
244 )
245 );
246 }
247
248 fclose($fp);
249
250 return $name;
251 }
static _sanitizeFilemame(string $a_filename)

References ilFileUtils\_sanitizeFilemame(), getMailPath(), getUploadLimit(), and rotateFiles().

+ Here is the call graph for this function:

◆ storeUploadedFile()

ilFileDataMail::storeUploadedFile ( array  $file)
Parameters
array{name:string,tmp_name:string}$file

Definition at line 256 of file class.ilFileDataMail.php.

256 : string
257 {
258 $file['name'] = ilFileUtils::_sanitizeFilemame($file['name']);
259
260 $this->rotateFiles($this->getMailPath() . '/' . $this->user_id . '_' . $file['name']);
261
263 $file['tmp_name'],
264 $file['name'],
265 $this->getMailPath() . '/' . $this->user_id . '_' . $file['name']
266 );
267
268 return $file['name'];
269 }
static moveUploadedFile(string $a_file, string $a_name, string $a_target, bool $a_raise_errors=true, string $a_mode="move_uploaded")
move uploaded file

References ilFileUtils\_sanitizeFilemame(), getMailPath(), ilFileUtils\moveUploadedFile(), and rotateFiles().

+ Here is the call graph for this function:

◆ unlinkFile()

ilFileDataMail::unlinkFile ( string  $a_filename)

Definition at line 302 of file class.ilFileDataMail.php.

302 : bool
303 {
304 if (is_file($this->mail_path . '/' . basename($this->user_id . '_' . $a_filename))) {
305 return unlink($this->mail_path . '/' . basename($this->user_id . '_' . $a_filename));
306 }
307
308 return false;
309 }

Referenced by unlinkFiles().

+ Here is the caller graph for this function:

◆ unlinkFiles()

ilFileDataMail::unlinkFiles ( array  $a_filenames)
Parameters
list<string>$a_filenames

Definition at line 291 of file class.ilFileDataMail.php.

291 : string
292 {
293 foreach ($a_filenames as $file) {
294 if (!$this->unlinkFile($file)) {
295 return $file;
296 }
297 }
298
299 return '';
300 }
unlinkFile(string $a_filename)

References unlinkFile().

+ Here is the call graph for this function:

Field Documentation

◆ $db

ilDBInterface ilFileDataMail::$db
protected

Definition at line 30 of file class.ilFileDataMail.php.

◆ $ilias

ILIAS ilFileDataMail::$ilias
protected

Definition at line 31 of file class.ilFileDataMail.php.

◆ $mail_max_upload_file_size

int ilFileDataMail::$mail_max_upload_file_size
protected

Definition at line 27 of file class.ilFileDataMail.php.

Referenced by getUploadLimit().

◆ $mail_path

string ilFileDataMail::$mail_path

Definition at line 26 of file class.ilFileDataMail.php.

Referenced by getMailPath().

◆ $storage_directory

Filesystem ilFileDataMail::$storage_directory
protected

Definition at line 29 of file class.ilFileDataMail.php.

Referenced by saveFile().

◆ $tmp_directory

Filesystem ilFileDataMail::$tmp_directory
protected

Definition at line 28 of file class.ilFileDataMail.php.


The documentation for this class was generated from the following file: