Nextcloud PHP API (master)

AFilesDocument extends IndexDocument
in package

AbstractYes

Abstract Class AFilesDocument

This is mostly used by 3rd party apps that want to complete the IIndexDocument with more information about a file before its index:

\OC::$server->getEventDispatcher()->addListener( '\OCA\Files_FullTextSearch::onFileIndexing', function(GenericEvent $e) { //@var \OCP\Files\Node $file $file = $e->getArgument('file');

       // @var \OCP\Files_FullTextSearch\Model\AFilesDocument $document
       $document = $e->getArgument('document');
   }

);

Tags
since
15.0.0

Table of Contents

Methods

getMimetype()  : string
Returns the mimetype of the document/file.
getOwnerId()  : string
Returns the owner of the document/file.
getPath()  : string
Returns the path of the document/file.
getType()  : string
Returns the type of the document/file.
getViewerId()  : string
Returns the current viewer of the document/file.

Methods

getMimetype()

Returns the mimetype of the document/file.

public abstract getMimetype() : string
Tags
since
15.0.0
Return values
string

getOwnerId()

Returns the owner of the document/file.

public abstract getOwnerId() : string
Tags
since
15.0.0
Return values
string

getPath()

Returns the path of the document/file.

public abstract getPath() : string
Tags
since
15.0.0
Return values
string

getType()

Returns the type of the document/file.

public abstract getType() : string
Tags
since
15.0.0
Return values
string

\OCP\Files\FileInfo::TYPE_FILE|\OCP\Files\FileInfo::TYPE_FOLDER

getViewerId()

Returns the current viewer of the document/file.

public abstract getViewerId() : string
Tags
since
15.0.0
Return values
string

        
On this page

Search results