/** * Get the ultimate original storage path for a file * * Use this when putting a new file into the system * * @param string $sha1 File SHA-1 base36 * @return string */ public function getPathForSHA1($sha1) { if (strlen($sha1) < 3) { throw new MWException("Invalid file SHA-1."); } return $this->backend->getContainerStoragePath("{$this->repoName}-original") . "/{$sha1[0]}/{$sha1[1]}/{$sha1[2]}/{$sha1}"; }