Node

class OC\Files\Node\Node
Source:lib/private/Files/Node/Node.php#43
Implements:OCP\Files\Node

Properties

protected static property OC\Files\Node\Node::$view
Source:lib/private/Files/Node/Node.php#47
Type:\OC\Files\View
protected static property OC\Files\Node\Node::$root
Source:lib/private/Files/Node/Node.php#52
Type:\OC\Files\Node\Root
protected static property OC\Files\Node\Node::$path
Source:lib/private/Files/Node/Node.php#57
Type:string
protected static property OC\Files\Node\Node::$fileInfo
Source:lib/private/Files/Node/Node.php#62
Type:\OCP\Files\FileInfo

Methods

public OC\Files\Node\Node::__construct($root, $view, $path, $fileInfo=null)
Source:

lib/private/Files/Node/Node.php#70

Parameters:
protected OC\Files\Node\Node::createNonExistingNode($path)
Creates a Node of the same type that represents a non-existing path
Source:

lib/private/Files/Node/Node.php#84

Parameters:
  • $path (string) path
Returns:

string non-existing node class

Throws:

\Exception

public OC\Files\Node\Node::getFileInfo()
Returns the matching file info
Source:lib/private/Files/Node/Node.php#95
Returns:\OCP\Files\FileInfo
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
protected OC\Files\Node\Node::sendHooks($hooks, $args=null)
Source:

lib/private/Files/Node/Node.php#113

Parameters:
  • $hooks (string[])
protected OC\Files\Node\Node::checkPermissions($permissions)
Source:

lib/private/Files/Node/Node.php#128

Parameters:
  • $permissions (int)
Returns:

bool

Throws:

\OCP\Files\InvalidPathException

Throws:

\OCP\Files\NotFoundException

Throws:

\OCP\Files\InvalidPathException

Throws:

\OCP\Files\NotFoundException

public OC\Files\Node\Node::delete()
Source:lib/private/Files/Node/Node.php#132
public OC\Files\Node\Node::touch($mtime=null)
Source:

lib/private/Files/Node/Node.php#141

Parameters:
  • $mtime (int)
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

Throws:

\OCP\Files\NotPermittedException

public OC\Files\Node\Node::getStorage()
Source:lib/private/Files/Node/Node.php#161
Returns:\OC\Files\Storage\Storage
Throws:\OCP\Files\NotFoundException
public OC\Files\Node\Node::getPath()
Source:lib/private/Files/Node/Node.php#169
Returns:string
public OC\Files\Node\Node::getInternalPath()
Source:lib/private/Files/Node/Node.php#176
Returns:string
public OC\Files\Node\Node::getId()
Source:lib/private/Files/Node/Node.php#186
Returns:int
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
public OC\Files\Node\Node::stat()
Source:lib/private/Files/Node/Node.php#193
Returns:array
public OC\Files\Node\Node::getMTime()
Source:lib/private/Files/Node/Node.php#202
Returns:int
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
public OC\Files\Node\Node::getSize($includeMounts=true)
Source:

lib/private/Files/Node/Node.php#212

Parameters:
  • $includeMounts (bool)
Returns:

int

Throws:

\OCP\Files\InvalidPathException

Throws:

\OCP\Files\NotFoundException

Throws:

\OCP\Files\InvalidPathException

Throws:

\OCP\Files\NotFoundException

public OC\Files\Node\Node::getEtag()
Source:lib/private/Files/Node/Node.php#221
Returns:string
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
public OC\Files\Node\Node::getPermissions()
Source:lib/private/Files/Node/Node.php#230
Returns:int
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
public OC\Files\Node\Node::isReadable()
Source:lib/private/Files/Node/Node.php#239
Returns:bool
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
public OC\Files\Node\Node::isUpdateable()
Source:lib/private/Files/Node/Node.php#248
Returns:bool
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
public OC\Files\Node\Node::isDeletable()
Source:lib/private/Files/Node/Node.php#257
Returns:bool
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
public OC\Files\Node\Node::isShareable()
Source:lib/private/Files/Node/Node.php#266
Returns:bool
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
public OC\Files\Node\Node::isCreatable()
Source:lib/private/Files/Node/Node.php#275
Returns:bool
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
Throws:\OCP\Files\InvalidPathException
Throws:\OCP\Files\NotFoundException
public OC\Files\Node\Node::getParent()
Source:lib/private/Files/Node/Node.php#282
Returns:\OC\Files\Node\Node
public OC\Files\Node\Node::getName()
Source:lib/private/Files/Node/Node.php#293
Returns:string
protected OC\Files\Node\Node::normalizePath($path)
Source:

lib/private/Files/Node/Node.php#301

Parameters:
  • $path (string)
Returns:

string

public OC\Files\Node\Node::isValidPath($path)
check if the requested path is valid
Source:

lib/private/Files/Node/Node.php#327

Parameters:
  • $path (string)
Returns:

bool

public OC\Files\Node\Node::isMounted()
Source:lib/private/Files/Node/Node.php#337
public OC\Files\Node\Node::isShared()
Source:lib/private/Files/Node/Node.php#341
public OC\Files\Node\Node::getMimeType()
Source:lib/private/Files/Node/Node.php#345
public OC\Files\Node\Node::getMimePart()
Source:lib/private/Files/Node/Node.php#349
public OC\Files\Node\Node::getType()
Source:lib/private/Files/Node/Node.php#353
public OC\Files\Node\Node::isEncrypted()
Source:lib/private/Files/Node/Node.php#357
public OC\Files\Node\Node::getMountPoint()
Source:lib/private/Files/Node/Node.php#361
public OC\Files\Node\Node::getOwner()
Source:lib/private/Files/Node/Node.php#365
public OC\Files\Node\Node::getChecksum()
Source:lib/private/Files/Node/Node.php#369
public OC\Files\Node\Node::getExtension()
Source:lib/private/Files/Node/Node.php#372
public OC\Files\Node\Node::lock($type)
Source:

lib/private/Files/Node/Node.php#380

Parameters:
  • $type (int) OCPLockILockingProvider::LOCK_SHARED or OCPLockILockingProvider::LOCK_EXCLUSIVE
Throws:

\OCP\Lock\LockedException

public OC\Files\Node\Node::changeLock($type)
Source:

lib/private/Files/Node/Node.php#388

Parameters:
  • $type (int) OCPLockILockingProvider::LOCK_SHARED or OCPLockILockingProvider::LOCK_EXCLUSIVE
Throws:

\OCP\Lock\LockedException

public OC\Files\Node\Node::unlock($type)
Source:

lib/private/Files/Node/Node.php#396

Parameters:
  • $type (int) OCPLockILockingProvider::LOCK_SHARED or OCPLockILockingProvider::LOCK_EXCLUSIVE
Throws:

\OCP\Lock\LockedException

public OC\Files\Node\Node::copy($targetPath)
Source:

lib/private/Files/Node/Node.php#407

Parameters:
  • $targetPath (string)
Returns:

\OC\Files\Node\Node

Throws:

\OCP\Files\InvalidPathException

Throws:

\OCP\Files\NotFoundException

Throws:

\OCP\Files\NotPermittedException if copy not allowed or failed

Throws:

\OCP\Files\InvalidPathException

Throws:

\OCP\Files\NotFoundException

Throws:

\OCP\Files\NotPermittedException if copy not allowed or failed

Throws:

\OCP\Files\InvalidPathException

Throws:

\OCP\Files\NotFoundException

Throws:

\OCP\Files\NotPermittedException if copy not allowed or failed

public OC\Files\Node\Node::move($targetPath)
Source:

lib/private/Files/Node/Node.php#434

Parameters:
  • $targetPath (string)
Returns:

\OC\Files\Node\Node

Throws:

\OCP\Files\InvalidPathException

Throws:

\OCP\Files\NotFoundException

Throws:

\OCP\Files\NotPermittedException if move not allowed or failed

Throws:

\OCP\Lock\LockedException

Throws:

\OCP\Files\InvalidPathException

Throws:

\OCP\Files\NotFoundException

Throws:

\OCP\Files\NotPermittedException if move not allowed or failed

Throws:

\OCP\Lock\LockedException

Throws:

\OCP\Files\InvalidPathException

Throws:

\OCP\Files\NotFoundException

Throws:

\OCP\Files\NotPermittedException if move not allowed or failed

Throws:

\OCP\Lock\LockedException

Throws:

\OCP\Files\InvalidPathException

Throws:

\OCP\Files\NotFoundException

Throws:

\OCP\Files\NotPermittedException if move not allowed or failed

Throws:

\OCP\Lock\LockedException

public OC\Files\Node\Node::getCreationTime()
Source:lib/private/Files/Node/Node.php#461
public OC\Files\Node\Node::getUploadTime()
Source:lib/private/Files/Node/Node.php#465