ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
Metadata.php
Go to the documentation of this file.
1
<?php
2
declare(strict_types=1);
3
4
namespace
ILIAS\Filesystem\DTO
;
5
6
use
ILIAS\Filesystem\MetadataType
;
7
16
final
class
Metadata
17
{
18
22
private
$path
;
26
private
$type
;
27
38
public
function
__construct
(
string
$path
,
string
$type
)
39
{
40
if
($type !==
MetadataType::FILE
&& $type !==
MetadataType::DIRECTORY
) {
41
throw
new \InvalidArgumentException(
"The metadata type must be FILE or DIRECTORY but \"$type\" was given."
);
42
}
43
44
$this->path =
$path
;
45
$this->type =
$type
;
46
}
47
53
public
function
getPath
() : string
54
{
55
return
$this->path
;
56
}
57
67
public
function
getType
() : string
68
{
69
return
$this->type
;
70
}
71
77
public
function
isDir
() : bool
78
{
79
return
(strcmp($this->
getType
(),
MetadataType::DIRECTORY
) === 0);
80
}
81
87
public
function
isFile
() : bool
88
{
89
return
(strcmp($this->
getType
(),
MetadataType::FILE
) === 0);
90
}
91
}
ILIAS\Filesystem\DTO\Metadata\getType
getType()
The type of the subject which can be FILE or DIRECTORY.
Definition:
Metadata.php:67
ILIAS\Filesystem\DTO\Metadata\__construct
__construct(string $path, string $type)
Metadata constructor.
Definition:
Metadata.php:38
ILIAS\Filesystem\DTO\Metadata\$path
$path
Definition:
Metadata.php:22
ILIAS\Filesystem\DTO\Metadata\getPath
getPath()
The path to the file or directory.
Definition:
Metadata.php:53
ILIAS\Filesystem\MetadataType\FILE
const FILE
The subject is file.
Definition:
MetadataType.php:20
ILIAS\Filesystem\DTO\Metadata\$type
$type
Definition:
Metadata.php:26
ILIAS\Filesystem\DTO\Metadata\isDir
isDir()
The path is a directory.
Definition:
Metadata.php:77
ILIAS\Filesystem\DTO\Metadata
Class Metadata This class holds all default metadata send by the filesystem adapters.
Definition:
Metadata.php:16
ILIAS\Filesystem\DTO\Metadata\isFile
isFile()
The path is a file.
Definition:
Metadata.php:87
ILIAS\Filesystem\MetadataType\DIRECTORY
const DIRECTORY
The subject is a directory.
Definition:
MetadataType.php:24
ILIAS\Filesystem\DTO
Definition:
Metadata.php:4
MetadataType
src
Filesystem
DTO
Metadata.php
Generated on Sat Apr 5 2025 21:01:44 for ILIAS by
1.8.13 (using
Doxyfile
)