use Stoic\Utilities\FileHelper;
$fh = new FileHelper('./');
// the '~' prefix on a path will be intelligently replaced with './'
if ($fh->folderExists('~/files') && $fh->fileExists('~/files/myFile.txt')) {
$contents = $fh->getContents('~/files/myFile.txt');
$fh->putContents('~/files/myFile.txt', strrev($contents));
}
Continue to read about LogconsoleAppender, or visit the Table of Contents.