Directory container.

api

 Methods

constructor

__construct(string $name, int $permissions) 

Parameters

$name

string

$permissions

int

optional

Exceptions

\org\bovigo\vfs\vfsStreamException

adds child to the directory

addChild(\org\bovigo\vfs\vfsStreamContent $child) 

checks whether the container can be applied to given name

appliesTo(string $name) : bool
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::appliesTo()

Parameters

$name

string

Returns

bool

adds content to given container

at(\org\bovigo\vfs\vfsStreamContainer $container) : \org\bovigo\vfs\vfsStreamContent
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::at()

Parameters

Returns

change owner group of file to given group

chgrp(int $group) : \org\bovigo\vfs\vfsStreamContent
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::chgrp()

Parameters

$group

int

Returns

change file mode to given permissions

chmod(int $permissions) : \org\bovigo\vfs\vfsStreamContent
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::chmod()

Parameters

$permissions

int

Returns

change owner of file to given user

chown(int $user) : \org\bovigo\vfs\vfsStreamContent
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::chown()

Parameters

$user

int

Returns

returns the last access time of the stream content

fileatime() : int
Inherited

since 0.9
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::fileatime()

Returns

int

returns the last attribute modification time of the stream content

filectime() : int
Inherited

since 0.9
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::filectime()

Returns

int

returns the last modification time of the stream content

filemtime() : int
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::filemtime()

Returns

int

returns the child with the given name

getChild(string $name) : \org\bovigo\vfs\vfsStreamContent

Parameters

$name

string

Returns

returns a list of children for this directory

getChildren() : \org\bovigo\vfs\vfsStreamContent[]

returns owner group of file

getGroup() : int
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::getGroup()

Returns

int

returns iterator for the children

getIterator() : \org\bovigo\vfs\vfsStreamContainerIterator

returns the file name of the content

getName() : string
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::getName()

Returns

string

returns permissions

getPermissions() : int
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::getPermissions()

Returns

int

returns the type of the container

getType() : int
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::getType()

Returns

int

returns owner of file

getUser() : int
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::getUser()

Returns

int

checks whether the container contains a child with the given name

hasChild(string $name) : bool

Parameters

$name

string

Returns

bool

checks whether directory contains any children

hasChildren() : bool

since 0.10.0

Returns

bool

checks whether dir is a dot dir

isDot() : bool

Returns

bool

checks whether content is executable

isExecutable(int $user, int $group) : bool
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::isExecutable()

Parameters

$user

int

id of user to check for

$group

int

id of group to check for

Returns

bool

checks whether file is owned by group

isOwnedByGroup(int $group) : bool
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::isOwnedByGroup()

Parameters

$group

int

Returns

bool

checks whether file is owned by given user

isOwnedByUser(int $user) : bool
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::isOwnedByUser()

Parameters

$user

int

Returns

bool

checks whether content is readable

isReadable(int $user, int $group) : bool
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::isReadable()

Parameters

$user

int

id of user to check for

$group

int

id of group to check for

Returns

bool

checks whether content is writable

isWritable(int $user, int $group) : bool
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::isWritable()

Parameters

$user

int

id of user to check for

$group

int

id of group to check for

Returns

bool

sets last access time of the stream content

lastAccessed(int $fileatime) : \org\bovigo\vfs\vfsStreamContent
Inherited

since 0.9
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::lastAccessed()

Parameters

$fileatime

int

Returns

sets the last attribute modification time of the stream content

lastAttributeModified(int $filectime) : \org\bovigo\vfs\vfsStreamContent
Inherited

since 0.9
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::lastAttributeModified()

Parameters

$filectime

int

Returns

sets the last modification time of the stream content

lastModified(int $filemtime) : \org\bovigo\vfs\vfsStreamContent
Inherited

inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::lastModified()

Parameters

$filemtime

int

Returns

returns path to this content

path() : string
Inherited

since 1.2.0
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::path()

Returns

string

removes child from the directory

removeChild(string $name) : bool

Parameters

$name

string

Returns

bool

renames the content

rename(string $newName) 

Parameters

$newName

string

Exceptions

\org\bovigo\vfs\vfsStreamException

returns size of directory

size() : int

The size of a directory is always 0 bytes. To calculate the summarized size of all children in the directory use sizeSummarized().

Returns

int

returns summarized size of directory and its children

sizeSummarized() : int

Returns

int

returns complete vfsStream url for this content

url() : string
Inherited

since 1.2.0
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::url()

Returns

string

helper method to calculate the child name

getChildName(string $name, string $ownName) : string

Parameters

$name

string

$ownName

string

Returns

string

returns default permissions for concrete implementation

getDefaultPermissions() : int

since 0.8.0

Returns

int

helper method to detect the real child name

getRealChildName(string $name) : string

Parameters

$name

string

Returns

string

updates internal timestamps

updateModifications() 

 Properties

 

list of directory children

$children 

type vfsStreamContent[]
 

owner group of the file

$group 
Inherited

type int
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::$$group
 

timestamp of last access

$lastAccessed 
Inherited

type int
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::$$lastAccessed
 

timestamp of last attribute modification

$lastAttributeModified 
Inherited

type int
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::$$lastAttributeModified
 

timestamp of last modification

$lastModified 
Inherited

type int
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::$$lastModified
 

name of the container

$name 
Inherited

type string
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::$$name
 

permissions for content

$permissions 
Inherited

type int
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::$$permissions
 

type of the container

$type 
Inherited

type string
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::$$type
 

owner of the file

$user 
Inherited

type int
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::$$user
 

path to to this content

$parentPath 
Inherited

type string
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::$$parentPath

 Constants

 

stream content type: directory

TYPE_DIR 
Inherited

see \org\bovigo\vfs\getType()
inherited_from \org\bovigo\vfs\vfsStreamContent::TYPE_DIR
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::TYPE_DIR
 

stream content type: file

TYPE_FILE 
Inherited

see \org\bovigo\vfs\getType()
inherited_from \org\bovigo\vfs\vfsStreamContent::TYPE_FILE
inherited_from \org\bovigo\vfs\vfsStreamAbstractContent::TYPE_FILE