public function process_resource($manifestroot, &$fname, $folder) {
        $file = empty($folder) ? $manifestroot.'/'.$fname : $manifestroot.'/'.$folder.'/'.$fname;
        if (!file_exists($file) && $this->throwonerror) {
            throw new Exception('The file doesnt exist!');
        }

        GetDepFiles($manifestroot, $fname, $this->folder, $this->files);
        array_unshift($this->files, $folder.$fname);
        $this->init_empty_new();
        $this->href             = $folder.$fname;
        $this->identifierref    = $folder.$fname;
        $this->filename         = $fname;
        $this->isempty          = false;
        $this->folder           = $folder;
    }