InMemoryFile implements ISimpleFile
This class represents a file that is only hold in memory.
Tags
Interfaces, Classes and Traits
- ISimpleFile
- Interface ISimpleFile
Table of Contents
- $contents : string
- Holds the file contents.
- $name : string
- Holds the file name.
- __construct() : mixed
- InMemoryFile constructor.
- delete() : mixed
- In memory files can't be deleted.
- getContent() : string
- Get the content
- getETag() : string
- Get the ETag
- getMimeType() : string
- Get the MimeType
- getMTime() : int
- Get the last modification time
- getName() : string
- Get the name
- getSize() : int
- Get the size in bytes
- putContent() : mixed
- Overwrite the file
- read() : resource
- Stream reading is unsupported for in memory files.
- write() : resource
- Stream writing isn't available for in memory files.
Properties
$contents
Holds the file contents.
private
string
$contents
$name
Holds the file name.
private
string
$name
Methods
__construct()
InMemoryFile constructor.
public
__construct(string $name, string $contents) : mixed
Parameters
- $name : string
-
The file name
- $contents : string
-
The file contents
Tags
Return values
mixed —delete()
In memory files can't be deleted.
public
delete() : mixed
Tags
Return values
mixed —getContent()
Get the content
public
getContent() : string
Tags
Return values
string —getETag()
Get the ETag
public
getETag() : string
Tags
Return values
string —getMimeType()
Get the MimeType
public
getMimeType() : string
Tags
Return values
string —getMTime()
Get the last modification time
public
getMTime() : int
Tags
Return values
int —getName()
Get the name
public
getName() : string
Tags
Return values
string —getSize()
Get the size in bytes
public
getSize() : int
Tags
Return values
int —putContent()
Overwrite the file
public
putContent(mixed $data) : mixed
Parameters
- $data : mixed
Tags
Return values
mixed —read()
Stream reading is unsupported for in memory files.
public
read() : resource
Tags
Return values
resource —write()
Stream writing isn't available for in memory files.
public
write() : resource