package
|
OCA\Gallery\Service
|
Methods
Constructor
__construct(string $appName, \OCA\Gallery\Environment\Environment $environment, \OCP\ILogger $logger)
inherited
Returns the node if it's a folder we have access to
getAllowedSubFolder(\OCP\Files\Folder $node, string $nodeType) : array|\OCP\Files\Folder
Arguments
Response
array|\OCP\Files\Folder
Returns the file matching the given ID
getFile(integer $nodeId) : \OCP\Files\Node
inherited
Throws |
- \OCA\Gallery\Service\NotFoundServiceException
|
Arguments
$nodeId
integer
ID of the resource to locate
Response
\OCP\Files\Node
Returns various information about a folder
getFolderData(\OCP\Files\Folder $node) : \OCA\Gallery\Service\array<string,int|string|boolean|\OCA\Gallery\Service\array<string,int|\OCA\Gallery\Service\string>>
Arguments
Response
\OCA\Gallery\Service\array>
Returns the node matching the given ID
getNode(integer $nodeId) : \OCP\Files\Node
inherited
Throws |
- \OCA\Gallery\Service\NotFoundServiceException
|
Arguments
$nodeId
integer
ID of the resource to locate
Response
\OCP\Files\Node
Returns various information about a node
getNodeData(\OCP\Files\Node|\OCP\Files\File|\OCP\Files\Folder $node) : \OCA\Gallery\Service\array<string,int|string|boolean|\OCA\Gallery\Service\array<string,int|\OCA\Gallery\Service\string>>
Arguments
$node
\OCP\Files\Node|\OCP\Files\File|\OCP\Files\Folder
Response
\OCA\Gallery\Service\array>
Retrieves all files and sub-folders contained in a folder
getNodes(\OCP\Files\Folder $folder, integer $subDepth) : array
If we can't find anything in the current folder, we throw an exception as there is no point
in doing any more work, but if we're looking at a sub-folder, we return an empty array so
that it can be simply ignored
Arguments
$folder
\OCP\Files\Folder
Response
array
Returns the node type, either 'dir' or 'file'
getNodeType(\OCP\Files\Node $node) : string
If there is a problem, we return an empty string so that the node can be ignored
Arguments
Response
string
Returns what we known about the owner of a node
getOwnerData(\OCP\Files\Node $node) : null|\OCA\Gallery\Service\array<string,int|\OCA\Gallery\Service\string>
Arguments
Response
null|\OCA\Gallery\Service\array
Determines if we can consider the node mounted locally or if it's been authorised to be
scanned
isAllowed(\OCP\Files\Node $node) : boolean
Arguments
Response
boolean
Determines if the files are hosted locally (shared or not) and can be used by the preview
system
isAllowedAndAvailable(\OCP\Files\Node $node) : boolean
isMounted() doesn't include externally hosted shares, so we need to exclude those from the
non-mounted nodes
Arguments
Response
boolean
Determines if the node is available, as in readable
isAvailable(\OCP\Files\Node $node) : boolean
todo
|
Test to see by how much using file_exists slows things down
|
Arguments
Response
boolean
Determines if the node is a share which is hosted externally
isExternalShare(\OCP\Files\Node $node) : boolean
Arguments
Response
boolean
Determines if the user has allowed the use of external shares
isExternalShareAllowed() : boolean
Determines if we've reached the root folder
isRootFolder(\OCP\Files\Folder $folder, integer $level) : boolean
Arguments
$folder
\OCP\Files\Folder
Response
boolean
Throws an exception if this problem occurs in the current folder, otherwise just ignores the
sub-folder
recoverFromGetNodesError(integer $subDepth, \Exception $exception) : array
Throws |
- \OCA\Gallery\Service\NotFoundServiceException
|
Arguments
Response
array
Makes extra sure that we can actually do something with the file
validateNode(\OCP\Files\Node $node)
inherited
|
|
Throws |
- \OCA\Gallery\Service\NotFoundServiceException
|
Arguments
Properties
virtualRootLevel
virtualRootLevel : integer
features
features : array<mixed,string>
Type(s)
array<mixed,string>
ignoreAlbum
ignoreAlbum : string
appName
appName : string
inherited
environment
environment : \OCA\Gallery\Environment\Environment
inherited
logger
logger : \OCP\ILogger
inherited