Jarves\Storage\FileStorage::checkAccess PHP Method

checkAccess() public method

Checks the file access.
public checkAccess ( $path )
$path
    public function checkAccess($path)
    {
        $file = null;
        try {
            $file = $this->webFilesystem->getFile($path);
        } catch (FileNotFoundException $e) {
            while ('/' !== $path) {
                try {
                    $path = dirname($path);
                    $file = $this->webFilesystem->getFile($path);
                } catch (FileNotFoundException $e) {
                }
            }
        }
        if ($file && !$this->acl->isUpdatable('jarves/file', array('path' => $path))) {
            throw new AccessDeniedException(sprintf('No access to file `%s`', $path));
        }
    }