function actionDefault() { // Get the file object for the current file $file = new YDFSFile(__FILE__); // Dump the object echo __FILE__; YDDebugUtil::dump($file); // Dump the object echo '<br>Basename: ' . $file->getBasename(); echo '<br>Extension: ' . $file->getExtension(); echo '<br>Path: ' . $file->getPath(); echo '<br>LastModified: ' . $file->getLastModified(); echo '<br>File size: ' . $file->getSize(); // Get the contents YDDebugUtil::dump($file->getContents(), '$file->getContents()'); // Get the partial contents YDDebugUtil::dump($file->getContents(2, 3), '$file->getContents( 2, 3 )'); // Create a dummy file $file = new YDFSFile('dummy.txt', true); // Set the initial contents $file->setContents('initial contents'); // Update the contents $file->setContents('new contents'); // Get the contents YDDebugUtil::dump($file->getContents(), '$file->getContents() after update'); // Append the contents $file->setContents(YD_CRLF . 'appended contents', true); // Get the contents YDDebugUtil::dump($file->getContents(), '$file->getContents() after append'); // Delete the file $file->delete(); // Get the file object for the current file $file = new YDFSFile('nofile.php'); }