LocalFileSystem

Filepath: phork/php/ext/files/LocalFileSystem.class.php

The LocalFileSystem class is used for all file system operations. It wraps the standard PHP filesystem functions with error handling and allows for the filesystem functions to be extended in a standardized way.

The following operations are supported


Example

if (!($objFileSystem = AppRegistry::get('FileSystem', false))) {
    if (AppLoader::includeExtension('files/', $strFileSystem = AppConfig::get('FileSystem') . 'FileSystem')) {
        $objFileSystem = new $strFileSystem();
        AppRegistry::register('FileSystem', $objFileSystem);
    }
}

if (!$objFileSystem->isDirectory('/foo/bar')) {
    $blnResult = $objFileSystem->createDirectory('/foo/bar', 0755, true);
}