ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
FileReadAccess.php
Go to the documentation of this file.
1 <?php
2 
4 
8 
9 /******************************************************************************
10  *
11  * This file is part of ILIAS, a powerful learning management system.
12  *
13  * ILIAS is licensed with the GPL-3.0, you should have received a copy
14  * of said license along with the source code.
15  *
16  * If this is not the case or you just want to try ILIAS, you'll find
17  * us at:
18  * https://www.ilias.de
19  * https://github.com/ILIAS-eLearning
20  *
21  *****************************************************************************/
35 interface FileReadAccess
36 {
50  public function read(string $path): string;
51 
52 
63  public function has(string $path): bool;
64 
75  public function getMimeType(string $path): string;
76 
77 
91  public function getTimestamp(string $path): \DateTimeImmutable;
92 
93 
111  public function getSize(string $path, int $fileSizeUnit): DataSize;
112 
130  public function setVisibility(string $path, string $visibility): bool;
131 
132 
149  public function getVisibility(string $path): string;
150 }
getVisibility(string $path)
Get the file visibility.
getSize(string $path, int $fileSizeUnit)
Get the size of a file.
This class provides the data size with additional information to remove the work to calculate the siz...
Definition: DataSize.php:30
getTimestamp(string $path)
Get the timestamp of the file.
$path
Definition: ltiservices.php:32
has(string $path)
Checks whether a file exists.
read(string $path)
Reads a file content to a string.
setVisibility(string $path, string $visibility)
Sets the visibility for a file.
getMimeType(string $path)
Get a files mime-type.