protected function _prepareForVfs($resource)
    {
        // get folder from file
        $path = dirname($resource);

        // fix slashed for vfs
        $path = $this->_vfsSlashes($path);

        // and store as root for virtual-filesystem
        if ($this->vfsLastPath != $path) {
            $this->vfs->setup($path);
            $this->vfsLastPath = $path;
        }

        // wrap file
        return $this->vfs->url($resource);
    }