public function resolveFile($name)
    {
        $components = $this->parseResource($name);
        foreach ($components['dirs'] as $dir) {
            if (is_file($file = $dir . ($dir ? '/' : '') .  $components['file'])) {
                return $file;
            }
        }
        return false;
    }