/**
  * Provides list of all cached elements.
  *
  * @param null|string $parent Branch to start from. Eg. you can specify /sandbox and you'll get /sandbox,
  *     /sandbox/info but not /test or /test/sandbox.
  *
  * @return array[]
  */
 public function getEntriesList($parent = null)
 {
     $filesList = $this->finder->getFilesList();
     $basePath = $this->finder->getRealCacheDir();
     $basePathLength = mb_strlen($basePath);
     $entries = array();
     foreach ($filesList as $e) {
         $entry = mb_substr($e->getPath(), $basePathLength);
         if ($entry === '') {
             $entry = '/';
         } elseif (DIRECTORY_SEPARATOR !== '/') {
             //Why elseif and not if below? Simple - it's waste of time to call str_replace when $entry was empty before
             $entry = str_replace($entry, DIRECTORY_SEPARATOR, '/');
             //Did I mention I hate Windos?
         }
         if ($parent && strpos($entry, $parent) !== 0) {
             continue;
         }
         $entries[] = $entry;
     }
     return $entries;
 }