示例#1
0
 /**
  * Sets this header with the values from the ezcArchiveEntry $entry.
  *
  * The values that are possible to set from the ezcArchiveEntry $entry are set in this header.
  *
  * @param ezcArchiveEntry $entry
  * @return void
  */
 public function setHeaderFromArchiveEntry(ezcArchiveEntry $entry)
 {
     $this->version = 10;
     // FIXME
     $this->bitFlag = 0;
     // FIXME
     $this->atime = $entry->getAccessTime();
     $this->groupId = $entry->getGroupId();
     $this->userId = $entry->getUserId();
     $this->setModificationTime($entry->getModificationTime());
     if ($entry->isSymLink()) {
         $this->uncompressedSize = strlen($entry->getLink());
         $this->crc = ezcArchiveChecksums::getCrc32FromString($entry->getLink());
     } else {
         $this->uncompressedSize = $entry->getSize();
         $this->crc = ezcArchiveChecksums::getCrc32FromFile($entry->getPath());
     }
     $this->setFileName($entry->getPath(false));
 }