ISimpleFile

interface OCP\Files\SimpleFS\ISimpleFile
Interface ISimpleFile
Implemented by:OCP\Files\SimpleFS\InMemoryFile OC\Files\SimpleFS\NewSimpleFile OC\Files\SimpleFS\SimpleFile
Source:lib/public/Files/SimpleFS/ISimpleFile.php#36

Methods

public OCP\Files\SimpleFS\ISimpleFile::getName()
Get the name
Source:lib/public/Files/SimpleFS/ISimpleFile.php#44
Returns:string
Since:11.0.0
public OCP\Files\SimpleFS\ISimpleFile::getSize()
Get the size in bytes
Source:lib/public/Files/SimpleFS/ISimpleFile.php#52
Returns:int
Since:11.0.0
public OCP\Files\SimpleFS\ISimpleFile::getETag()
Get the ETag
Source:lib/public/Files/SimpleFS/ISimpleFile.php#60
Returns:string
Since:11.0.0
public OCP\Files\SimpleFS\ISimpleFile::getMTime()
Get the last modification time
Source:lib/public/Files/SimpleFS/ISimpleFile.php#68
Returns:int
Since:11.0.0
public OCP\Files\SimpleFS\ISimpleFile::getContent()
Get the content
Source:lib/public/Files/SimpleFS/ISimpleFile.php#78
Throws:\OCP\Files\NotPermittedException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\NotPermittedException
Throws:\OCP\Files\NotFoundException
Returns:string
Since:11.0.0
public OCP\Files\SimpleFS\ISimpleFile::putContent($data)
Overwrite the file
Source:

lib/public/Files/SimpleFS/ISimpleFile.php#88

Parameters:
  • $data (string | resource)
Throws:

\OCP\Files\NotPermittedException

Throws:

\OCP\Files\NotFoundException

Throws:

\OCP\Files\NotPermittedException

Throws:

\OCP\Files\NotFoundException

Since:

11.0.0

public OCP\Files\SimpleFS\ISimpleFile::delete()
Delete the file
Source:lib/public/Files/SimpleFS/ISimpleFile.php#96
Throws:\OCP\Files\NotPermittedException
Since:11.0.0
public OCP\Files\SimpleFS\ISimpleFile::getMimeType()
Get the MimeType
Source:lib/public/Files/SimpleFS/ISimpleFile.php#104
Returns:string
Since:11.0.0
public OCP\Files\SimpleFS\ISimpleFile::read()
Open the file as stream for reading, resulting resource can be operated as stream like the result from php’s own fopen
Source:lib/public/Files/SimpleFS/ISimpleFile.php#113
Returns:resource
Throws:\OCP\Files\NotPermittedException
Since:14.0.0
public OCP\Files\SimpleFS\ISimpleFile::write()
Open the file as stream for writing, resulting resource can be operated as stream like the result from php’s own fopen
Source:lib/public/Files/SimpleFS/ISimpleFile.php#122
Returns:resource | bool
Throws:\OCP\Files\NotPermittedException
Since:14.0.0