third_party/vfsstream/vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamDirectory.php
For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
- Package
- org\bovigo\vfs
\org\bovigo\vfs\vfsStreamDirectory
- Implements
- \org\bovigo\vfs\vfsStreamContainer
- Parent(s)
- \org\bovigo\vfs\vfsStreamAbstractContent
- Api
Constants
TYPE_FILE
= 32768
- Inherited_from
- \org\bovigo\vfs\vfsStreamContent::TYPE_FILE
- Inherited_from
- \org\bovigo\vfs\vfsStreamAbstractContent::TYPE_FILE
- See
- \org\bovigo\vfs\getType()
TYPE_DIR
= 16384
- Inherited_from
- \org\bovigo\vfs\vfsStreamContent::TYPE_DIR
- Inherited_from
- \org\bovigo\vfs\vfsStreamAbstractContent::TYPE_DIR
- See
- \org\bovigo\vfs\getType()
Methods
__construct
(string $name, int $permissions = null)
: void
constructor
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $permissions | int |
optional |
| Exception | Description |
|---|---|
| \org\bovigo\vfs\vfsStreamException |
addChild
(
\org\bovigo\vfs\vfsStreamContent
$child)
: void
adds child to the directory
| Name | Type | Description |
|---|---|---|
| $child | \org\bovigo\vfs\vfsStreamContent |
appliesTo
(string $name)
: bool
checks whether the container can be applied to given name
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::appliesTo()| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| bool |
at
(
\org\bovigo\vfs\vfsStreamContainer
$container)
:
\org\bovigo\vfs\vfsStreamContent
adds content to given container
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::at()| Name | Type | Description |
|---|---|---|
| $container | \org\bovigo\vfs\vfsStreamContainer |
| Type | Description |
|---|---|
| \org\bovigo\vfs\vfsStreamContent |
chgrp
(int $group)
:
\org\bovigo\vfs\vfsStreamContent
change owner group of file to given group
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::chgrp()| Name | Type | Description |
|---|---|---|
| $group | int |
| Type | Description |
|---|---|
| \org\bovigo\vfs\vfsStreamContent |
chmod
(int $permissions)
:
\org\bovigo\vfs\vfsStreamContent
change file mode to given permissions
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::chmod()| Name | Type | Description |
|---|---|---|
| $permissions | int |
| Type | Description |
|---|---|
| \org\bovigo\vfs\vfsStreamContent |
chown
(int $user)
:
\org\bovigo\vfs\vfsStreamContent
change owner of file to given user
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::chown()| Name | Type | Description |
|---|---|---|
| $user | int |
| Type | Description |
|---|---|
| \org\bovigo\vfs\vfsStreamContent |
fileatime
()
: int
returns the last access time of the stream content
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::fileatime()| Type | Description |
|---|---|
| int |
- Since
- 0.9
filectime
()
: int
returns the last attribute modification time of the stream content
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::filectime()| Type | Description |
|---|---|
| int |
- Since
- 0.9
filemtime
()
: int
returns the last modification time of the stream content
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::filemtime()| Type | Description |
|---|---|
| int |
getChild
(string $name)
:
\org\bovigo\vfs\vfsStreamContent
returns the child with the given name
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| \org\bovigo\vfs\vfsStreamContent |
getChildren
()
:
\org\bovigo\vfs\vfsStreamContent[]
returns a list of children for this directory
| Type | Description |
|---|---|
| \org\bovigo\vfs\vfsStreamContent[] |
getGroup
()
: int
returns owner group of file
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::getGroup()| Type | Description |
|---|---|
| int |
getIterator
()
:
\org\bovigo\vfs\vfsStreamContainerIterator
returns iterator for the children
| Type | Description |
|---|---|
| \org\bovigo\vfs\vfsStreamContainerIterator |
getName
()
: string
returns the file name of the content
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::getName()| Type | Description |
|---|---|
| string |
getPermissions
()
: int
returns permissions
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::getPermissions()| Type | Description |
|---|---|
| int |
getType
()
: int
returns the type of the container
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::getType()| Type | Description |
|---|---|
| int |
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: \org\bovigo\vfs\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: \org\bovigo\vfs\vfsStreamAbstractContent::isOwnedByGroup()| Name | Type | Description |
|---|---|---|
| $group | int |
| Type | Description |
|---|---|
| bool |
isOwnedByUser
(int $user)
: bool
checks whether file is owned by given user
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::isOwnedByUser()| Name | Type | Description |
|---|---|---|
| $user | int |
| Type | Description |
|---|---|
| bool |
isReadable
(int $user, int $group)
: bool
checks whether content is readable
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::isReadable()| 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
checks whether content is writable
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::isWritable()| 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)
:
\org\bovigo\vfs\vfsStreamContent
sets last access time of the stream content
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::lastAccessed()| Name | Type | Description |
|---|---|---|
| $fileatime | int |
| Type | Description |
|---|---|
| \org\bovigo\vfs\vfsStreamContent |
- Since
- 0.9
lastAttributeModified
(int $filectime)
:
\org\bovigo\vfs\vfsStreamContent
sets the last attribute modification time of the stream content
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::lastAttributeModified()| Name | Type | Description |
|---|---|---|
| $filectime | int |
| Type | Description |
|---|---|
| \org\bovigo\vfs\vfsStreamContent |
- Since
- 0.9
lastModified
(int $filemtime)
:
\org\bovigo\vfs\vfsStreamContent
sets the last modification time of the stream content
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::lastModified()| Name | Type | Description |
|---|---|---|
| $filemtime | int |
| Type | Description |
|---|---|
| \org\bovigo\vfs\vfsStreamContent |
path
()
: string
returns path to this content
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::path()| Type | Description |
|---|---|
| string |
- Since
- 1.2.0
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 |
|---|---|
| \org\bovigo\vfs\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 |
url
()
: string
returns complete vfsStream url for this content
Inherited from: \org\bovigo\vfs\vfsStreamAbstractContent::url()| Type | Description |
|---|---|
| string |
- Since
- 1.2.0