\Pydio\Core\UtilsFileHelper

Class FileHelper

Summary

Methods
Properties
Constants
loadSerialFile()
saveSerialFile()
silentUnlink()
getRemoteContent()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

loadSerialFile()

loadSerialFile(String  $filePath, Boolean  $skipCheck = false, string  $format = "ser") : array

Load an array stored serialized inside a file.

Warning : currently does not take a context, filtering will be applied only based on global configs (AJXP_DATA_PATH, etc...). Make sure to filter the path if required (e.g. AJXP_USER) before passing it to the function.

Parameters

String $filePath

Full path to the file

Boolean $skipCheck

do not test for file existence before opening

string $format

Returns

array

saveSerialFile()

saveSerialFile(String  $filePath, array|object  $value, Boolean  $createDir = true, boolean  $silent = false, string  $format = "ser", boolean  $jsonPrettyPrint = false) 

Stores an Array as a serialized string inside a file.

Parameters

String $filePath

Full path to the file

array|object $value

The value to store

Boolean $createDir

Whether to create the parent folder or not, if it does not exist.

boolean $silent

Silently write the file, are throw an exception on problem.

string $format

"ser" or "json"

boolean $jsonPrettyPrint

If json, use pretty printing

Throws

\Exception

silentUnlink()

silentUnlink(  $file) : void

Try to remove a file without errors

Parameters

$file

getRemoteContent()

getRemoteContent(string  $url) : boolean|mixed|string

Parameters

string $url

Returns

boolean|mixed|string