ISimpleFile
in
This interface allows to manage simple files.
This interface must not be implemented in your application but instead should be used as a service and injected in your code with dependency injection.
Tags
Table of Contents
Methods
- delete() : void
- Delete the file
- getContent() : string
- Get the content
- getETag() : string
- Get the ETag
- getExtension() : string
- getMimeType() : string
- Get the MimeType
- getMTime() : int
- Get the last modification time
- getName() : string
- Get the name
- getSize() : int|float
- Get the size in bytes
- putContent() : void
- Overwrite the file
- read() : resource|false
- Open the file as stream for reading, resulting resource can be operated as stream like the result from php's own fopen
- write() : resource|bool
- Open the file as stream for writing, resulting resource can be operated as stream like the result from php's own fopen
Methods
delete()
Delete the file
public
delete() : void
Tags
getContent()
Get the content
public
getContent() : string
Tags
Return values
stringgetETag()
Get the ETag
public
getETag() : string
Tags
Return values
stringgetExtension()
public
getExtension() : string
Tags
Return values
stringgetMimeType()
Get the MimeType
public
getMimeType() : string
Tags
Return values
stringgetMTime()
Get the last modification time
public
getMTime() : int
Tags
Return values
intgetName()
Get the name
public
getName() : string
Tags
Return values
stringgetSize()
Get the size in bytes
public
getSize() : int|float
Tags
Return values
int|floatputContent()
Overwrite the file
public
putContent(string|resource $data) : void
Parameters
- $data : string|resource
Tags
read()
Open the file as stream for reading, resulting resource can be operated as stream like the result from php's own fopen
public
read() : resource|false
Tags
Return values
resource|falsewrite()
Open the file as stream for writing, resulting resource can be operated as stream like the result from php's own fopen
public
write() : resource|bool