ProviderV2

class OC\Preview\ProviderV2
Source:lib/private/Preview/ProviderV2.php#34
Implements:OCP\Preview\IProviderV2

Properties

Methods

public OC\Preview\ProviderV2::__construct($options=[])
Constructor
Source:

lib/private/Preview/ProviderV2.php#44

Parameters:
  • $options (array)
public abstract OC\Preview\ProviderV2::getMimeType()
Source:lib/private/Preview/ProviderV2.php#51
Returns:string Regex with the mimetypes that are supported by this provider
public OC\Preview\ProviderV2::isAvailable($file)
Check if a preview can be generated for $path
Source:

lib/private/Preview/ProviderV2.php#59

Parameters:
Returns:

bool

public abstract OC\Preview\ProviderV2::getThumbnail($file, $maxX, $maxY)
get thumbnail for file at path $path
Source:

lib/private/Preview/ProviderV2.php#72

Parameters:
  • $file (OCP\Files\File)
  • $maxX (int) The maximum X size of the thumbnail. It can be smaller depending on the shape of the image
  • $maxY (int) The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image
Returns:

null | \OCP\IImage false if no preview was generated

Since:

17.0.0

protected OC\Preview\ProviderV2::getLocalFile($file, $maxSize=null)
Get a path to either the local file or temporary file
Source:

lib/private/Preview/ProviderV2.php#81

Parameters:
  • $file (OCP\Files\File)
  • $maxSize (int) maximum size for temporary files
Returns:

string

protected OC\Preview\ProviderV2::cleanTmpFiles()
Clean any generated temporary files
Source:lib/private/Preview/ProviderV2.php#103