|
@@ 917-922 (lines=6) @@
|
| 914 |
|
*/ |
| 915 |
|
protected function getHeaderSize($path) { |
| 916 |
|
$headerSize = 0; |
| 917 |
|
if (!is_resource($path)) { |
| 918 |
|
$realFile = $this->util->stripPartialFileExtension($path); |
| 919 |
|
if ($this->storage->file_exists($realFile)) { |
| 920 |
|
$path = $realFile; |
| 921 |
|
} |
| 922 |
|
} |
| 923 |
|
$firstBlock = $this->readFirstBlock($path); |
| 924 |
|
|
| 925 |
|
if (substr($firstBlock, 0, strlen(Util::HEADER_START)) === Util::HEADER_START) { |
|
@@ 969-975 (lines=7) @@
|
| 966 |
|
protected function getHeader($path) { |
| 967 |
|
if (is_resource($path)) { |
| 968 |
|
$exists = false; |
| 969 |
|
} else { |
| 970 |
|
$realFile = $this->util->stripPartialFileExtension($path); |
| 971 |
|
$exists = $this->storage->file_exists($realFile); |
| 972 |
|
if ($exists) { |
| 973 |
|
$path = $realFile; |
| 974 |
|
} |
| 975 |
|
} |
| 976 |
|
|
| 977 |
|
$firstBlock = $this->readFirstBlock($path); |
| 978 |
|
$result = $this->parseRawHeader($firstBlock); |