/**
  * @param File $file
  *
  * @return array
  */
 public function removeThumbnails(File $file)
 {
     if (!$this->isImage($file->getExtension())) {
         return;
     }
     $iterator = new \RegexIterator(new \DirectoryIterator($this->getFullPath($file)), '/' . preg_quote($file->getName(), '/') . '.thumb_[a-z]+/');
     foreach ($iterator as $thumbnail) {
         \Cx\Lib\FileSystem\FileSystem::delete_file($thumbnail);
     }
 }
 public function moveFile(File $file, $destination)
 {
     global $_ARRAYLANG;
     if (!empty($destination)) {
         if ($file->getExtension() == '' && is_dir($this->rootPath . ltrim($file->getPath(), '.') . '/' . $file->getName())) {
             $fileName = $this->rootPath . ltrim($file->getPath(), '.') . '/' . $file->getName();
             $destinationFileName = $this->rootPath . ltrim($file->getPath(), '.') . '/' . $destination;
         } else {
             $fileName = $this->rootPath . ltrim($file->getPath(), '.') . '/' . $file->getName() . '.' . $file->getExtension();
             $destinationFileName = $this->rootPath . ltrim($file->getPath(), '.') . '/' . $destination . '.' . $file->getExtension();
         }
         if ($fileName == $destinationFileName) {
             return sprintf($_ARRAYLANG['TXT_FILEBROWSER_FILE_SUCCESSFULLY_RENAMED'], $file->getName());
         }
         if (!\Cx\Lib\FileSystem\FileSystem::move($fileName, $destinationFileName, false)) {
             return sprintf($_ARRAYLANG['TXT_FILEBROWSER_FILE_UNSUCCESSFULLY_RENAMED'], $file->getName());
         }
         return sprintf($_ARRAYLANG['TXT_FILEBROWSER_FILE_SUCCESSFULLY_RENAMED'], $file->getName());
     } else {
         return sprintf($_ARRAYLANG['TXT_FILEBROWSER_FILE_UNSUCCESSFULLY_RENAMED'], $file->getName());
     }
 }