protected function writable($path) {
        $fullPath = "{$this->basePath}/$path";
        while (!file_exists($fullPath) && $fullPath != basename($fullPath)) {
            $fullPath = dirname($fullPath);
        }
        return is_writable($fullPath);
    }
protected function writable($path) {
        $fullPath = "{$this->basePath}/$path";
        while (!file_exists($fullPath) && $fullPath != basename($fullPath)) {
            $fullPath = dirname($fullPath);
        }
        return is_writable($fullPath);
    }
protected function writable ( $ path ) { $ fullPath = "{$this->basePath}/$path" ; while ( ! file_exists ( $ fullPath ) && $ fullPath != basename ( $ fullPath ) ) { $ fullPath = dirname ( $ fullPath ) ; } return is_writable ( $ fullPath ) ; }
Checks if a file is writable, if the file does not exist, traverses up the file path.
@param string $path
@return boolean
Checks if a file is writable if the file does not exist traverses up the file path .