public static boolean isWithinDefaultWorkingDir(final Path workingDir, Configuration conf)
    throws IOException {
    Path defaultWorkingDir = getDefaultWorkingSnapshotDir(CommonFSUtils.getRootDir(conf));
    return workingDir.equals(defaultWorkingDir) || isSubDirectoryOf(workingDir, defaultWorkingDir);
  }
Determines if the given workingDir is a subdirectory of the default working snapshot directory
@param workingDir a directory to check
@param conf       configuration for the HBase cluster
@return true if the given workingDir is a subdirectory of the default working directory for
        snapshots, false otherwise
@throws IOException if we can't get the root dir
hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotDescriptionUtils.java