Directory
class Directory extends Node
FileSystem Directory representation.
Constants
S_IFMT |
|
DEF_MODE |
|
S_IFTYPE |
|
Methods
Class constructor.
Returns size as the number of child elements.
Adds child Directory.
Adds child File.
Adds child Link.
Adds child Node.
Removes child Node
Returns children
Details
at line 38
__construct(string $basename)
Class constructor.
in Node at line 54
chmod(int $mode)
Changes access to file.
This will apply the DIR/FILE type mask for use by stat to distinguish between file and directory.
in Node at line 64
int
mode()
Returns file mode
in Node at line 74
chown($userid)
Changes ownership.
in Node at line 84
mixed
user()
Returns ownership.
in Node at line 94
chgrp($groupid)
Changes group ownership.
in Node at line 104
mixed
group()
Returns group ownership.
at line 98
int
size()
Returns size as the number of child elements.
in Node at line 131
string
basename()
Returns Node basename.
in Node at line 141
setBasename(string $basename)
Sets new basename
in Node at line 151
string
path()
Returns node path.
in Node at line 169
string
url()
Returns node URL.
in Node at line 187
string
__toString()
Returns node absolute path (without scheme).
in Node at line 197
string|null
dirname()
Returns Node parent absolute path.
in Node at line 209
setAccessTime(int $time)
Sets last access time
in Node at line 219
setModificationTime(int $time)
Sets last modification time
in Node at line 229
setChangeTime(int $time)
Sets last inode change time
in Node at line 239
int
atime()
Returns last access time
in Node at line 249
int
mtime()
Returns last modification time
in Node at line 259
int
ctime()
Returns last inode change time (chown etc.)
at line 51
addDirectory(Directory $directory)
Adds child Directory.
at line 61
addFile(File $file)
Adds child File.
at line 71
addLink(Link $link)
Adds child Link.
at line 83
addNode(Node $node)
Adds child Node.
at line 112
Node
childAt(string $path)
Returns child Node existing at path.
at line 126
remove(string $basename)
Removes child Node
at line 136
array
children()
Returns children