class FileHelper implements ProtectedContextAwareInterface (View source)

Helper to read files.

Methods

string
readFile(string $filepath)

Read and return the files contents for further use.

string
getSha1(string $filepath)

No description

array
fileInfo(string $filepath)

Get file name and path information

array
stat(string $filepath)

Get file information like creation and modification times as well as size.

bool
exists(string $filepath)

Check if the given file path exists

bool
allowsCallOfMethod(string $methodName)

No description

Details

string readFile(string $filepath)

Read and return the files contents for further use.

Parameters

string $filepath

Return Value

string

string getSha1(string $filepath)

No description

Parameters

string $filepath

Return Value

string

array fileInfo(string $filepath)

Get file name and path information

Parameters

string $filepath

Return Value

array

with keys dirname, basename, extension (if any), and filename

array stat(string $filepath)

Get file information like creation and modification times as well as size.

Parameters

string $filepath

Return Value

array

with keys mode, uid, gid, size, atime, mtime, ctime, (blksize, blocks, dev, ino, nlink, rdev)

bool exists(string $filepath)

Check if the given file path exists

Parameters

string $filepath

Return Value

bool

bool allowsCallOfMethod(string $methodName)

No description

Parameters

string $methodName

Return Value

bool