appflower/appflower_studio — pull request #9 by eventhorizonpl (2012-09-04 10:40:53+00:00)
Title: class for checking dir, file or link permissions

Hi,

This patch is for "Create library for error handling on File Operations".

Class is very simple as well as its use.

require_once dirname(__DIR__) . '/../../vendor/autoload/UniversalClassLoader.class.php';
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
'AppFlower\Studio' => dirname(__DIR__) . '/vendor',
));
$loader->register();

use AppFlower\Studio\Filesystem\Permissions;

$permissions = new Permissions();

$ret = $permissions->isWritable(sfConfig::get('sf_config_dir').'/schema.yml');
if ($ret !== true) {
return $ret;
}

Best regards,
Michal