__construct() __construct(string $path, string $regex = '', array $extensions = '') Set path of file or directory Parameters string $path Path of file or directory string $regex Regex to limit file listing array $extensions Supported file extensions in regex format
ls() ls() : boolean List directory files Limit the files matching with regex pattern and file extensions Returns boolean — Directory file listing successful or not
getFiles() getFiles() : array Get list of files after performing ls in a directory Returns array — List of files of directory
getMessage() getMessage() : string Get message file operation message Returns string — File operation message
load() load() : boolean Load contents of a file Returns boolean — Loading file contents success or not
formatSize() formatSize(integer $bytes) : string Format bytes to human readable file size Parameters integer $bytes File size Returns string — File size in human readable