def Matches(self, file_entry, search_depth):
    """Determines if the file entry matches the find specification.

    Args:
      file_entry (FileEntry): file entry.
      search_depth (int): number of location path segments to compare.

    Returns:
      tuple: contains:

        bool: True if the file entry matches the find specification, False
            otherwise.
        bool: True if the location matches, False if not or None if no location
            specified.
    """
    if self._location_segments is None:
      location_match = None
    else:
      location_match = self._CheckLocation(file_entry, search_depth)
      if not location_match:
        return False, location_match

      if search_depth != self._number_of_location_segments:
        return False, location_match

    match = self._CheckFileEntryType(file_entry)
    if match is not None and not match:
      return False, location_match

    match = self._CheckIsAllocated(file_entry)
    if match is not None and not match:
      return False, location_match

    return True, location_match
Determines if the file entry matches the find specification.

    Args:
      file_entry (FileEntry): file entry.
      search_depth (int): number of location path segments to compare.

    Returns:
      tuple: contains:

        bool: True if the file entry matches the find specification, False
            otherwise.
        bool: True if the location matches, False if not or None if no location
            specified.