Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge pull request #45 from marc-mabe/rm_unused_Filesystem_readInfoFile
Browse files Browse the repository at this point in the history
removed unused internal function Filesystem::readInfoFile
  • Loading branch information
marc-mabe committed Dec 20, 2015
2 parents 5cda324 + e5be21d commit cfa1cf1
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/Storage/Adapter/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -1274,36 +1274,6 @@ protected function getFileSpec($normalizedKey)
return $this->lastFileSpec;
}

/**
* Read info file
*
* @param string $file
* @param bool $nonBlocking Don't block script if file is locked
* @param bool $wouldblock The optional argument is set to TRUE if the lock would block
* @return array|bool The info array or false if file wasn't found
* @throws Exception\RuntimeException
*/
protected function readInfoFile($file, $nonBlocking = false, & $wouldblock = null)
{
if (!file_exists($file)) {
return false;
}

$content = $this->getFileContent($file, $nonBlocking, $wouldblock);
if ($nonBlocking && $wouldblock) {
return false;
}

ErrorHandler::start();
$ifo = unserialize($content);
$err = ErrorHandler::stop();
if (!is_array($ifo)) {
throw new Exception\RuntimeException("Corrupted info file '{$file}'", 0, $err);
}

return $ifo;
}

/**
* Read a complete file
*
Expand Down

0 comments on commit cfa1cf1

Please sign in to comment.