\Pydio\Core\Utils\VarsStatHelper

Class MimesHelper Various utils functions for file mimetypes

Summary

Methods
Properties
Constants
getMimeInfo()
getAjxpMimes()
basenameIsImage()
getImageMimeType()
getStreamingMimeType()
roundSize()
isHidden()
isBrowsableArchive()
convertBytes()
relativeDate()
winSetHidden()
$sizeUnit
No constants found
No protected methods found
No protected properties found
N/A
getRegisteredExtensions()
$extensionsCache
N/A

Properties

$sizeUnit

$sizeUnit : 

Type

$extensionsCache

$extensionsCache : 

MISC CONFS

Type

Methods

getMimeInfo()

getMimeInfo(\Pydio\Access\Core\Model\AJXP_Node  $ajxpNode, boolean|null  $isDir = null) : array

Parameters

\Pydio\Access\Core\Model\AJXP_Node $ajxpNode
boolean|null $isDir

Returns

array

getAjxpMimes()

getAjxpMimes(string  $keyword) : string

Gather a list of mime that must be treated specially. Used for dynamic replacement in XML mainly.

Parameters

string $keyword

"editable", "image", "audio", "zip"

Returns

string

basenameIsImage()

basenameIsImage(  $fileName) : boolean

Whether a file is to be considered as an image or not

Parameters

$fileName

Returns

boolean

getImageMimeType()

getImageMimeType(  $fileName) : string

Static image mime type headers

Parameters

$fileName

Returns

string

getStreamingMimeType()

getStreamingMimeType(  $fileName) : boolean|string

Headers to send when streaming

Parameters

$fileName

Returns

boolean|string

roundSize()

roundSize(  $filesize, boolean  $phpConfig = false) : string

Display a human readable string for a bytesize (1MB, 2,3Go, etc)

Parameters

$filesize
boolean $phpConfig

Returns

string

isHidden()

isHidden(string  $fileName) : boolean

Hidden files start with dot

Parameters

string $fileName

Returns

boolean

isBrowsableArchive()

isBrowsableArchive(string  $fileName) : integer

Whether a file is a browsable archive

Parameters

string $fileName

Returns

integer

convertBytes()

convertBytes(string  $value) : integer

Convert a shorthand byte value from a PHP configuration directive to an integer value

Parameters

string $value

Returns

integer

relativeDate()

relativeDate(  $time,   $messages, boolean  $shortestForm = false) : boolean|mixed|string

Build a relative date string, using pydio messages library

Parameters

$time
$messages
boolean $shortestForm

Returns

boolean|mixed|string

winSetHidden()

winSetHidden(  $file) 

Hide file or folder for Windows OS

Parameters

$file

getRegisteredExtensions()

getRegisteredExtensions(\Pydio\Core\Model\ContextInterface  $ctx) : array

Get all registered extensions, from both the conf/extensions.conf.php and from the plugins

Parameters

\Pydio\Core\Model\ContextInterface $ctx

Returns

array