Folder¶
-
class
OC\Files\Node\
Folder
¶ Source: lib/private/Files/Node/Folder.php#51 Parent: OC\Files\Node\Node
Implements: OCP\Files\Folder
Methods¶
-
protected
OC\Files\Node\Folder::
createNonExistingNode
($path)¶ - Creates a Folder that represents a non-existing path
Source: Parameters: - $path (string) path
Returns: string non-existing node class
-
public
OC\Files\Node\Folder::
getFullPath
($path)¶ Source: Parameters: - $path (string) path relative to the folder
Returns: string
Throws:
-
public
OC\Files\Node\Folder::
getRelativePath
($path)¶ Source: Parameters: - $path (string)
Returns: string | null
-
public
OC\Files\Node\Folder::
isSubNode
($node)¶ - check if a node is a (grand-)child of the folder
Source: Parameters: - $node (
OC\Files\Node\Node
)
Returns: bool
- $node (
-
public
OC\Files\Node\Folder::
getDirectoryListing
()¶ - get the content of this directory
Source: lib/private/Files/Node/Folder.php#108 Returns: \OC\Files\Node\Node[]
Throws: \OCP\Files\NotFoundException
-
protected
OC\Files\Node\Folder::
createNode
($path, $info=null)¶ Source: Parameters: - $path (string)
- $info (
OCP\Files\FileInfo
)
Returns:
-
public
OC\Files\Node\Folder::
get
($path)¶ - Get the node at $path
Source: Parameters: - $path (string)
Returns: Throws:
-
public
OC\Files\Node\Folder::
nodeExists
($path)¶ Source: Parameters: - $path (string)
Returns: bool
-
public
OC\Files\Node\Folder::
newFolder
($path)¶ Source: Parameters: - $path (string)
Returns: Throws:
-
public
OC\Files\Node\Folder::
newFile
($path, $content=null)¶ Source: Parameters: - $path (string)
Returns: Throws:
-
public
OC\Files\Node\Folder::
search
($query)¶ - search for files with the name matching $query
Source: Parameters: - $query (string |
\OCP\Files\Search\ISearchQuery
)
Returns: - $query (string |
-
public
OC\Files\Node\Folder::
searchByMime
($mimetype)¶ - search for files by mimetype
Source: Parameters: - $mimetype (string)
Returns:
-
public
OC\Files\Node\Folder::
searchByTag
($tag, $userId)¶ - search for files by tag
Source: Parameters: - $tag (string | int) name or tag id
- $userId (string) owner of the tags
Returns:
-
public
OC\Files\Node\Folder::
getById
($id)¶ Source: Parameters: - $id (int)
Returns:
-
protected
OC\Files\Node\Folder::
getAppDataDirectoryName
()¶ Source: lib/private/Files/Node/Folder.php#415
-
protected
OC\Files\Node\Folder::
getByIdInRootMount
($id)¶ - In case the path we are currently in is inside the appdata_* folder,the original getById method does not work, because it can only look insidethe user’s mount points. But the user has no mount point for the root storage.So in that case we directly check the mount of the root if it containsthe id. If it does we check if the path is inside the path we are workingin.
Source: Parameters: - $id (int)
Returns: array
-
public
OC\Files\Node\Folder::
getFreeSpace
()¶ Source: lib/private/Files/Node/Folder.php#456
-
public
OC\Files\Node\Folder::
delete
()¶ Source: lib/private/Files/Node/Folder.php#460
-
public
OC\Files\Node\Folder::
getNonExistingName
($name)¶ - Add a suffix to the name in case the file exists
Source: Parameters: - $name (string)
Returns: string
Throws:
-
public
OC\Files\Node\Folder::
getRecent
($limit, $offset=0)¶ Source: Parameters: - $limit (int)
- $offset (int)
Returns: