private function path($file, array $options = []) {
        // get base and full paths
        $base = $this->Url->assetUrl($file, $options);
        $fullpath = preg_replace('/^' . preg_quote($this->request->getAttribute('webroot'), '/') . '/', '', urldecode($base));

        // do webroot path
        $webrootPath = Configure::read('App.wwwRoot') . str_replace('/', DS, $fullpath);
        if(file_exists($webrootPath))
            return $webrootPath;

        // do plugin webroot path
        $pluginFile = $this->_getPluginFile($fullpath);
        if($pluginFile !== null && file_exists($pluginFile))
            return $pluginFile;

        // not found?
        return false;
    }