*/
interface IArchive {
/**
- * Returns the table of contents (TOC) list for this tar archive.
+ * Returns the table of contents (TOC) list for this archive.
*
* @return array list of content
*/
public function getContentList();
/**
- * Returns an associative array with information
- * about a specific file in the archive.
+ * Returns an associative array with information about a specific file
+ * in the archive.
*
* @param mixed $index index or name of the requested file
* @return array
public function getFileInfo($index);
/**
- * Extracts a specific file and returns the content as string.
- * Returns false if extraction failed.
+ * Extracts a specific file and returns the content as string. Returns
+ * false if extraction failed.
*
* @param mixed $index index or name of the requested file
* @return string content of the requested file
public function extractToString($index);
/**
- * Extracts a specific file and writes it's content
- * to the file specified with $destination.
+ * Extracts a specific file and writes its content to the file specified
+ * with $destination.
*
* @param mixed $index index or name of the requested file
* @param string $destination
public function extract($index, $destination);
/**
- * Searchs a file in the tar archive
- * and returns the numeric fileindex.
+ * Searchs a file in the archive and returns the numeric file index.
* Returns false if not found.
*
* @param string $filename
}
/**
- * Returns the table of contents (TOC) list for this tar archive.
- *
- * @return array list of content
+ * @see wcf\system\io\IArchive::getContentList()
*/
public function getContentList() {
if (!$this->read) {
return $this->contentList;
}
- /**
- * Returns an associative array with information
- * about a specific file in the archive.
- *
- * @param mixed $fileindex index or name of the requested file
- * @return array $fileInfo
+ /**
+ * @see wcf\system\io\IArchive::getFileInfo()
*/
public function getFileInfo($fileIndex) {
if (!is_int($fileIndex)) {
return $this->contentList[$fileIndex];
}
- /**
- * Searchs a file in the tar archive
- * and returns the numeric fileindex.
- * Returns false if not found.
- *
- * @param string $filename
- * @return integer index of the requested file
+ /**
+ * @see wcf\system\io\IArchive::getIndexByFilename()
*/
public function getIndexByFilename($filename) {
foreach ($this->contentList as $index => $file) {
return false;
}
- /**
- * Extracts a specific file and returns the content as string.
- * Returns false if extraction failed.
- *
- * @param mixed $index index or name of the requested file
- * @return string content of the requested file
+ /**
+ * @see wcf\system\io\IArchive::extractToString()
*/
public function extractToString($index) {
if (!$this->read) {
return $content;
}
- /**
- * Extracts a specific file and writes it's content
- * to the file specified with $destination.
- *
- * @param mixed $index index or name of the requested file
- * @param string $destination
- * @return boolean $success
+ /**
+ * @see wcf\system\io\IArchive::extract()
*/
public function extract($index, $destination) {
if (!$this->read) {