public static function Create( string $folder, int $mode = 0700 )
   {

      if ( \is_dir( $folder ) )
      {
         // No folder = do nothing
         return;
      }

      if ( ! static::CanCreate( $folder ) )
      {
         // No rights to create the required folder
         throw new FolderAccessError(
            'IO',
            $folder,
            FolderAccessError::ACCESS_CREATE,
            'Creation of folder fails cause base folder is not writable!'
         );
      }

      try
      {
         if ( \DIRECTORY_SEPARATOR == '\\' )
         {
            // Windows = do not use the mode
            $res = \mkdir( $folder, null, true );
         }
         else
         {
            // All other use the mode flag
            $res = \mkdir( $folder, $mode, true );
         }
      }
      catch ( \Throwable $ex )
      {
         // Folder creation fails
         throw new FolderAccessError(
            'IO',
            $folder,
            FolderAccessError::ACCESS_CREATE,
            'Creation of folder fails cause base folder is not writable!',
            \E_USER_ERROR,
            $ex
         );
      }

      if ( ! $res || ! \is_dir( $folder ) )
      {
         // Folder creation fails
         throw new FolderAccessError(
            'IO',
            $folder,
            FolderAccessError::ACCESS_CREATE,
            'Unknown error while executing folder creation.'
         );
      }

      \clearstatcache();

   }