ISearchOrder

interface OCP\Files\Search\ISearchOrder
Implemented by:OC\Files\Search\SearchOrder
Source:lib/public/Files/Search/ISearchOrder.php#32

Constants

DIRECTION_ASCENDING = asc
Source:lib/public/Files/Search/ISearchOrder.php#33
DIRECTION_DESCENDING = desc
Source:lib/public/Files/Search/ISearchOrder.php#34

Methods

public OCP\Files\Search\ISearchOrder::getDirection()
The direction to sort in, either ISearchOrder::DIRECTION_ASCENDING or ISearchOrder::DIRECTION_DESCENDING
Source:lib/public/Files/Search/ISearchOrder.php#42
Returns:string
Since:12.0.0
public OCP\Files\Search\ISearchOrder::getField()
The field to sort on
Source:lib/public/Files/Search/ISearchOrder.php#50
Returns:string
Since:12.0.0
public OCP\Files\Search\ISearchOrder::sortFileInfo($a, $b)
Apply the sorting on 2 FileInfo objects
Source:

lib/public/Files/Search/ISearchOrder.php#60

Parameters:
Returns:

int -1 if $a < $b, 0 if $a = $b, 1 if $a > $b (for ascending, reverse for descending)

Since:

22.0.0