NewSimpleFile

class OC\Files\SimpleFS\NewSimpleFile
Source:lib/private/Files/SimpleFS/NewSimpleFile.php#37
Implements:OCP\Files\SimpleFS\ISimpleFile

Properties

Methods

public OC\Files\SimpleFS\NewSimpleFile::__construct($parentFolder, $name)
File constructor.
Source:lib/private/Files/SimpleFS/NewSimpleFile.php#48
Parameters:
public OC\Files\SimpleFS\NewSimpleFile::getName()
Get the name
Source:lib/private/Files/SimpleFS/NewSimpleFile.php#58
Returns:string
public OC\Files\SimpleFS\NewSimpleFile::getSize()
Get the size in bytes
Source:lib/private/Files/SimpleFS/NewSimpleFile.php#67
Returns:int
public OC\Files\SimpleFS\NewSimpleFile::getETag()
Get the ETag
Source:lib/private/Files/SimpleFS/NewSimpleFile.php#80
Returns:string
public OC\Files\SimpleFS\NewSimpleFile::getMTime()
Get the last modification time
Source:lib/private/Files/SimpleFS/NewSimpleFile.php#93
Returns:int
public OC\Files\SimpleFS\NewSimpleFile::getContent()
Get the content
Source:lib/private/Files/SimpleFS/NewSimpleFile.php#108
Returns:string
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\NotPermittedException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\NotPermittedException
public OC\Files\SimpleFS\NewSimpleFile::putContent($data)
Overwrite the file
Source:

lib/private/Files/SimpleFS/NewSimpleFile.php#129

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

\OCP\Files\NotPermittedException

Throws:

\OCP\Files\NotFoundException

Throws:

\OCP\Files\NotPermittedException

Throws:

\OCP\Files\NotFoundException

public OC\Files\SimpleFS\NewSimpleFile::delete()
Delete the file
Source:lib/private/Files/SimpleFS/NewSimpleFile.php#175
Throws:\OCP\Files\NotPermittedException
public OC\Files\SimpleFS\NewSimpleFile::getMimeType()
Get the MimeType
Source:lib/private/Files/SimpleFS/NewSimpleFile.php#186
Returns:string
public OC\Files\SimpleFS\NewSimpleFile::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/private/Files/SimpleFS/NewSimpleFile.php#201
Returns:resource
Throws:\OCP\Files\NotPermittedException
Since:14.0.0
public OC\Files\SimpleFS\NewSimpleFile::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/private/Files/SimpleFS/NewSimpleFile.php#216
Returns:resource | bool
Throws:\OCP\Files\NotPermittedException
Since:14.0.0