function replace($path) { $F = new File($path); $md5 = $F->md5(); $this->path = appPATH . 'qg/file/' . $md5; $F->copy($this->path); $this->setVs(array('name' => $F->basename(), 'mime' => $F->mime(), 'text' => $F->getText(), 'md5' => $F->md5(), 'size' => $F->size())); }