/**
  * Check if the target path exists and if it is writable. Depending on the
  * $createIfNotExists parameter it will be created if it does not exist.
  *
  * @param <type> $fullPath
  * @param <type> $createIfNotExists
  * @return <type>
  */
 protected static function checkTargetPath($fullPath, $createIfNotExists = false)
 {
     $path = self::getBasePath($fullPath);
     if ($createIfNotExists) {
         uFs::mkdir($path, 0777, true);
     } else {
         uFs::file_exists($path, true);
         uFs::is_writable($path, true);
     }
     return true;
 }