Skip to content

Access files by their name #9

@thekid

Description

@thekid

RandomAccessZipReaderImpl:

  public function entryNamed($name) {
    $this->index ?: $this->readCentralDirectory();

    if ($header= $this->index[$name] ?? null) {
      $this->streamPosition($header['offset']);
      return $this->currentEntry();
    } else {
      return null;
    }
  }

ZipArchiveReader:

  public function entry($name) {
    return $this->impl->entryNamed($name);
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions