code: private static boolean deleteRecursivelyIfExists(HdfsContext context, HdfsEnvironment hdfsEnvironment, Path path)
      {
          FileSystem fileSystem;
          try {
              fileSystem = hdfsEnvironment.getFileSystem(context, path);
          }
          catch (IOException ignored) {
              return false;
          }
  
          return deleteIfExists(fileSystem, path, true);
      }
docs: Attempts to remove the file or empty directory.
  
  @return true if the location no longer exists