Exemplo n.º 1
0
 /**
  * Normalize the file info.
  *
  * @param IFileInfo $file
  * @return array
  */
 protected function normalizeFileInfo(IFileInfo $file)
 {
     $normalized = ['type' => $file->isDirectory() ? 'dir' : 'file', 'path' => $this->getFilePath($file), 'timestamp' => $file->getMTime()];
     if ($normalized['type'] === 'file') {
         $normalized['size'] = $file->getSize();
     }
     return $normalized;
 }