vfsStreamDirectory.php
Directory container.
- Package
- bovigo_vfs
\vfsStreamDirectory
Directory container.
- Parent(s)
- \vfsStreamAbstractContent < \vfsStreamContent
Properties


\array<string,vfsStreamContent>
$children= 'array()'
list of directory children
array()
Details- Type
- \array<string,vfsStreamContent>


int
$lastAttributeModified= ''
timestamp of last attribute modification
Inherited from: \vfsStreamAbstractContent::$$lastAttributeModified- Type
- int
- Inherited_from
- \vfsStreamAbstractContent::$$lastAttributeModified
Methods


__construct(
string $name, int $permissions
=
null
)
:
void
constructor
Name | Type | Description |
---|---|---|
$name | string | |
$permissions | int | optional |
Exception | Description |
---|---|
\vfsStreamException |


addChild(
\vfsStreamContent $child
)
:
void
adds child to the directory
Name | Type | Description |
---|---|---|
$child | \vfsStreamContent |


appliesTo(
string $name
)
:
bool
checks whether the container can be applied to given name
Inherited from: \vfsStreamAbstractContent::appliesTo()Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
bool |


at(
\vfsStreamContainer $container
)
:
\vfsStreamContent
Name | Type | Description |
---|---|---|
$container | \vfsStreamContainer |
Type | Description |
---|---|
\vfsStreamContent |


chgrp(
int $group
)
:
\vfsStreamContent
change owner group of file to given group
Inherited from: \vfsStreamAbstractContent::chgrp()Name | Type | Description |
---|---|---|
$group | int |
Type | Description |
---|---|
\vfsStreamContent |


chmod(
int $permissions
)
:
\vfsStreamContent
Name | Type | Description |
---|---|---|
$permissions | int |
Type | Description |
---|---|
\vfsStreamContent |


chown(
int $user
)
:
\vfsStreamContent
Name | Type | Description |
---|---|---|
$user | int |
Type | Description |
---|---|
\vfsStreamContent |


fileatime(
)
:
int
returns the last access time of the stream content
Inherited from: \vfsStreamAbstractContent::fileatime()Type | Description |
---|---|
int |
- Since
- 0.9


filectime(
)
:
int
returns the last attribute modification time of the stream content
Inherited from: \vfsStreamAbstractContent::filectime()Type | Description |
---|---|
int |
- Since
- 0.9


filemtime(
)
:
int
returns the last modification time of the stream content
Inherited from: \vfsStreamAbstractContent::filemtime()Type | Description |
---|---|
int |


getChild(
string $name
)
:
\vfsStreamContent
returns the child with the given name
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
\vfsStreamContent |


getChildName(
string $name, string $ownName
)
:
string
helper method to calculate the child name
Name | Type | Description |
---|---|---|
$name | string | |
$ownName | string |
Type | Description |
---|---|
string |


getChildren(
)
:
\array<vfsStreamContent>
returns a list of children for this directory
Type | Description |
---|---|
\array<vfsStreamContent> |


getDefaultPermissions(
)
:
int
returns default permissions for concrete implementation
Type | Description |
---|---|
int |
- Since
- 0.8.0


getIterator(
)
:
\vfsStreamContainerIterator
returns iterator for the children
Type | Description |
---|---|
\vfsStreamContainerIterator |


getRealChildName(
string $name
)
:
string
helper method to detect the real child name
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
string |


hasChild(
string $name
)
:
bool
checks whether the container contains a child with the given name
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
bool |


hasChildren(
)
:
bool
checks whether directory contains any children
Type | Description |
---|---|
bool |
- Since
- 0.10.0


isExecutable(
int $user, int $group
)
:
bool
checks whether content is executable
Inherited from: \vfsStreamAbstractContent::isExecutable()Name | Type | Description |
---|---|---|
$user | int | id of user to check for |
$group | int | id of group to check for |
Type | Description |
---|---|
bool |


isOwnedByGroup(
int $group
)
:
bool
checks whether file is owned by group
Inherited from: \vfsStreamAbstractContent::isOwnedByGroup()Name | Type | Description |
---|---|---|
$group | int |
Type | Description |
---|---|
bool |


isOwnedByUser(
int $user
)
:
bool
checks whether file is owned by given user
Inherited from: \vfsStreamAbstractContent::isOwnedByUser()Name | Type | Description |
---|---|---|
$user | int |
Type | Description |
---|---|
bool |


isReadable(
int $user, int $group
)
:
bool
Name | Type | Description |
---|---|---|
$user | int | id of user to check for |
$group | int | id of group to check for |
Type | Description |
---|---|
bool |


isWritable(
int $user, int $group
)
:
bool
Name | Type | Description |
---|---|---|
$user | int | id of user to check for |
$group | int | id of group to check for |
Type | Description |
---|---|
bool |


lastAccessed(
int $fileatime
)
:
\vfsStreamContent
sets last access time of the stream content
Inherited from: \vfsStreamAbstractContent::lastAccessed()Name | Type | Description |
---|---|---|
$fileatime | int |
Type | Description |
---|---|
\vfsStreamContent |
- Since
- 0.9


lastAttributeModified(
int $filectime
)
:
\vfsStreamContent
sets the last attribute modification time of the stream content
Inherited from: \vfsStreamAbstractContent::lastAttributeModified()Name | Type | Description |
---|---|---|
$filectime | int |
Type | Description |
---|---|
\vfsStreamContent |
- Since
- 0.9


lastModified(
int $filemtime
)
:
\vfsStreamContent
sets the last modification time of the stream content
Inherited from: \vfsStreamAbstractContent::lastModified()Name | Type | Description |
---|---|---|
$filemtime | int |
Type | Description |
---|---|
\vfsStreamContent |


removeChild(
string $name
)
:
bool
removes child from the directory
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
bool |


rename(
string $newName
)
:
void
renames the content
Name | Type | Description |
---|---|---|
$newName | string |
Exception | Description |
---|---|
\vfsStreamException |


size(
)
:
int
returns size of directory
The size of a directory is always 0 bytes. To calculate the summarized size of all children in the directory use sizeSummarized().
Type | Description |
---|---|
int |


sizeSummarized(
)
:
int
returns summarized size of directory and its children
Type | Description |
---|---|
int |