function addFile($filename) { $this->nb_files++; $filename_package = $this->directory . ($this->save_src ? '/ftp' : '') . '/' . $this->getFilenameNewFile(); $content = file_get_contents($filename); $hash = $this->transformContent($content); file_put_contents($filename_package, $content); $this->command->addFile(filesize($filename_package), $this->hash ? $hash : null, $this->getFilenameNewFile()); $this->files_packages[] = $filename_package; return $this->getFilenameNewFile(); }