FileManagerInterface
interface FileManagerInterface (View source)
Defines read-only file access whose failures are reported through one typed filesystem boundary.
Methods
read(string $file)
Reads the full contents of a file.
string
size(string $file)
Returns the file size in bytes.
int
modified(string $file)
Returns the last modification time as a UNIX timestamp.
int
hash(string $file, string $algo = 'sha256')
Calculates a file hash using the given algorithm.
string
mime(string $file)
Detects the MIME type of a file.
string
permissions(string $file)
Returns the file permissions as an octal permission mask.
int
Details
read
string
read(string $file)
Reads the full contents of a file.
size
int
size(string $file)
Returns the file size in bytes.
modified
int
modified(string $file)
Returns the last modification time as a UNIX timestamp.
hash
string
hash(string $file, string $algo = 'sha256')
Calculates a file hash using the given algorithm.
mime
string
mime(string $file)
Detects the MIME type of a file.
permissions
int
permissions(string $file)
Returns the file permissions as an octal permission mask.