public static Path getTransformedPath(String name, String subDir, String root) {
    if (root != null) {
      Path newPath = new Path(root);
      if (subDir != null) {
        newPath = new Path(newPath, subDir);
      }
      return new Path(newPath, name);
    }
    return null;
  }
Returns a BEST GUESS as to whether or not other is a subdirectory of parent. It does not
take into account any intricacies of the underlying file system, which is assumed to be
HDFS. This should not return any false positives, but may return false negatives.

@param parent
@param other Directory to check if it is a subdirectory of parent
@return True, if other is subdirectory of parent
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/FileUtils.java