File

class OC\Files\Node\File
Source:lib/private/Files/Node/File.php#36
Parent:OC\Files\Node\Node
Implements:OCP\Files\File

Methods

protected OC\Files\Node\File::createNonExistingNode($path)
Creates a Folder that represents a non-existing path
Source:

lib/private/Files/Node/File.php#43

Parameters:
  • $path (string) path
Returns:

string non-existing node class

public OC\Files\Node\File::getContent()
Source:lib/private/Files/Node/File.php#52
Returns:string
Throws:\OCP\Files\NotPermittedException
Throws:\OCP\Lock\LockedException
Throws:\OCP\Files\NotPermittedException
Throws:\OCP\Lock\LockedException
public OC\Files\Node\File::putContent($data)
Source:

lib/private/Files/Node/File.php#69

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

\OCP\Files\NotPermittedException

Throws:

\OCP\Files\GenericFileException

Throws:

\OCP\Lock\LockedException

Throws:

\OCP\Files\NotPermittedException

Throws:

\OCP\Files\GenericFileException

Throws:

\OCP\Lock\LockedException

Throws:

\OCP\Files\NotPermittedException

Throws:

\OCP\Files\GenericFileException

Throws:

\OCP\Lock\LockedException

public OC\Files\Node\File::fopen($mode)
Source:

lib/private/Files/Node/File.php#88

Parameters:
  • $mode (string)
Returns:

resource

Throws:

\OCP\Files\NotPermittedException

Throws:

\OCP\Lock\LockedException

Throws:

\OCP\Files\NotPermittedException

Throws:

\OCP\Lock\LockedException

public OC\Files\Node\File::delete()
Source:lib/private/Files/Node/File.php#128
Throws:\OCP\Files\NotPermittedException
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\NotPermittedException
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\NotPermittedException
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
public OC\Files\Node\File::hash($type, $raw=false)
Source:

lib/private/Files/Node/File.php#147

Parameters:
  • $type (string)
  • $raw (bool)
Returns:

string

public OC\Files\Node\File::getChecksum()
Source:lib/private/Files/Node/File.php#154
public OC\Files\Node\File::getExtension()
Source:lib/private/Files/Node/File.php#158