docs: private static boolean deleteIfExists(FileSystem fileSystem, Path path, boolean recursive)
      {
          try {
              // attempt to delete the path
              if (fileSystem.delete(path, recursive)) {
                  return true;
              }
  
              // delete failed
              // check if path still exists
              return !fileSystem.exists(path);
          }
          catch (FileNotFoundException ignored) {
              // path was already removed or never existed
              return true;
          }
          catch (IOException ignored) {
          }
          return false;
      }