vfsStreamFile.php
File container.
- Package
- bovigo_vfs
\vfsStreamFile
File container.
- Parent(s)
- \vfsStreamAbstractContent < \vfsStreamContent
Properties


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 |


appliesTo(
string $name
)
:
bool
checks whether the container can be applied to given name
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 |


getContent(
)
:
string
returns the contents of the file
Getting content does not change the time when the file was last accessed.
Type | Description |
---|---|
string |


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


hasExclusiveLock(
)
:
bool
checks whether file is locked in exclusive mode
Type | Description |
---|---|
bool |
- See
- \https://github.com/mikey179/vfsStream/issues/6
- Since
- 0.10.0


hasSharedLock(
)
:
bool
checks whether file is locked in shared mode
Type | Description |
---|---|
bool |
- See
- \https://github.com/mikey179/vfsStream/issues/6
- 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 |


isLocked(
)
:
bool
checks whether file is locked
Type | Description |
---|---|
bool |
- See
- \https://github.com/mikey179/vfsStream/issues/6
- Since
- 0.10.0


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 |


lock(
int $operation
)
:
\vfsStreamFile
locks file for
Name | Type | Description |
---|---|---|
$operation | int |
Type | Description |
---|---|
\vfsStreamFile |
- See
- \https://github.com/mikey179/vfsStream/issues/6
- Since
- 0.10.0


read(
int $count
)
:
string
reads the given amount of bytes from content
Using this method changes the time when the file was last accessed.
Name | Type | Description |
---|---|---|
$count | int |
Type | Description |
---|---|
string |


readUntilEnd(
)
:
string
returns the content until its end from current offset
Using this method changes the time when the file was last accessed.
Type | Description |
---|---|
string |


seek(
int $offset, int $whence
)
:
bool
seeks to the given offset
Name | Type | Description |
---|---|---|
$offset | int | |
$whence | int |
Type | Description |
---|---|
bool |


setContent(
string $content
)
:
\vfsStreamFile
alias for withContent()
Name | Type | Description |
---|---|---|
$content | string |
Type | Description |
---|---|
\vfsStreamFile |
- See
- \withContent()


withContent(
string $content
)
:
\vfsStreamFile
sets the contents of the file
Setting content with this method does not change the time when the file was last modified.
Name | Type | Description |
---|---|---|
$content | string |
Type | Description |
---|---|
\vfsStreamFile |
- See
- \setContent()