Determine whether this Rock Ridge entry has a parent link record (used
        for relocating deep directory records).

        Parameters:
         None:
        Returns:
         True if this Rock Ridge entry has a parent link record, False otherwise.
340699
def parent_link_record_exists(self):
        # type: () -> bool
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('Rock Ridge extension not yet initialized')

        return self.dr_entries.pl_record is not None or self.ce_entries.pl_record is not None
1373896
def parent_link_extent(self):
        # type: () -> int
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('Rock Ridge extension not yet initialized')

        if self.dr_entries.pl_record is not None:
            return self.dr_entries.pl_record.parent_log_block_num
        if self.ce_entries.pl_record is not None:
            return self.ce_entries.pl_record.parent_log_block_num

        raise pycdlibexception.PyCdlibInternalError('Asked for parent extent for non-existent parent record')
1040992
def nextparent(self, parent, depth):
        '''
        
        '''
        if depth > 1:  # can't jump to parent of root node!
            pdir = os.path.dirname(self.name)
            line = 0
            for c, d in parent.traverse():
                if line > parent.curline and c.name.startswith(pdir):
                    parent.curline += 1
                line += 1
        else:  # otherwise just skip to next directory
            line = -1  # skip hidden parent node
            for c, d in parent.traverse():
                if line > parent.curline:
                    parent.curline += 1
                    if os.path.isdir(c.name) and c.name in parent.children[0:]:
                        break
                line += 1
731551
def hasChildren(self, parentIndex=QtCore.QModelIndex()):
        
        parentItem = self.getItem(parentIndex, altItem=self.invisibleRootItem)
        return parentItem.hasChildren()
518771
def parent(self):
        
        if self.path:
            return Category(os.path.dirname(self.path))
        return None
1169371
def get_parent(self, directory):
        
        assert settings.PAGE_DIR.startswith('/')
        assert settings.PAGE_DIR.endswith('/')

        parents = directory[len(settings.PAGE_DIR):]

        page = None
        if parents:
            for slug in parents.split('/'):
                page = Page.objects.get(parent=page, slug=slug)
        return page
1099289
public boolean isParentAnEmptyDirectory(File file) {
        File parent = file.getParentFile();

        if (parent != null && parent.exists() && parent.isDirectory() && parent.list().length == 0) {
            return true;
        }

        return false;
    }
483464
def is_multifile_object_without_children(self, location: str) -> bool:
        
        # (1) Find the base directory and base name
        if isdir(location):  # special case: parent location is the root folder where all the files are.
            return len(self.find_multifile_object_children(location)) == 0
        else:
            # TODO same comment than in find_multifile_object_children
            if exists(location):
                # location is a file without extension. We can accept that as being a multifile object without children
                return True
            else:
                return False
896179
def is_child(child_path, parent_path):
        
        parent_dir = os.path.join(parent_path, '')
        child_dir = os.path.join(child_path, '')
        return child_dir.startswith(parent_dir)
54588
def GetParentFileEntry(self):
    
    location = getattr(self.path_spec, 'location', None)
    if location is None:
      return None

    parent_location = self._file_system.DirnamePath(location)
    if parent_location is None:
      return None

    if parent_location == '':
      parent_location = self._file_system.PATH_SEPARATOR
      is_root = True
      is_virtual = True
    else:
      is_root = False
      is_virtual = False

    parent_path_spec = getattr(self.path_spec, 'parent', None)
    path_spec = cpio_path_spec.CPIOPathSpec(
        location=parent_location, parent=parent_path_spec)
    return CPIOFileEntry(
        self._resolver_context, self._file_system, path_spec,
        is_root=is_root, is_virtual=is_virtual)
1053034
def is_archive(self):
        

        ns_prefix = self.archive_namespace
        if ns_prefix:
            if ns_prefix + '_archive' in self.feed.feed:
                # This is declared to be an archive view
                return True
            if ns_prefix + '_current' in self.feed.feed:
                # This is declared to be the current view
                return False

        # Either we don't have the namespace, or the view wasn't declared.
        rels = collections.defaultdict(list)
        for link in self.feed.feed.links:
            rels[link.rel].append(link.href)

        return ('current' in rels and
                ('self' not in rels or
                 rels['self'] != rels['current']))
38775
def parent(self):
        
        if self._has_parent is None:
            _parent = self._ctx.backend.get_parent(self._ctx.dev)
            self._has_parent = _parent is not None
            if self._has_parent:
                self._parent = Device(_parent, self._ctx.backend)
            else:
                self._parent = None
        return self._parent
175068
def get_parent(self, update=False):
        
        depth = int(len(self.path) / self.steplen)
        if depth <= 1:
            return
        try:
            if update:
                del self._cached_parent_obj
            else:
                return self._cached_parent_obj
        except AttributeError:
            pass
        parentpath = self._get_basepath(self.path, depth - 1)
        self._cached_parent_obj = get_result_class(
            self.__class__).objects.get(path=parentpath)
        return self._cached_parent_obj
798272
def GetParentFileEntry(self):
    
    location = getattr(self.path_spec, 'location', None)
    if location is None:
      return None

    parent_location = self._file_system.DirnamePath(location)
    if parent_location is None:
      return None

    parent_path_spec = getattr(self.path_spec, 'parent', None)

    if parent_location == '':
      parent_location = self._file_system.PATH_SEPARATOR
      is_root = True
      is_virtual = True
    else:
      is_root = False
      is_virtual = False

    path_spec = zip_path_spec.ZipPathSpec(
        location=parent_location, parent=parent_path_spec)
    return ZipFileEntry(
        self._resolver_context, self._file_system, path_spec, is_root=is_root,
        is_virtual=is_virtual)
1051714
def is_a_member?(parent)
          my_split_dn = @ldap_object.dn.split(",")
          parent_split_dn = parent.ldap_object.dn.split(",")
          if (my_split_dn.count - 1) == parent_split_dn.count
            return true if my_split_dn[1] == parent_split_dn[0]
          end
          return false
        end
140459
def is_descendant_of(self, ancestor):
        
        stop = Folder(ancestor)
        for folder in self.ancestors():
            if folder == stop:
                return True
            if stop.depth > folder.depth:
                return False
        return False
894460
def _linkToParent(self, feature, parentName):
        
        parentParts = self.byFeatureName.get(parentName)
        if parentParts is None:
            raise GFF3Exception(
                "Parent feature does not exist: {}".format(parentName),
                self.fileName)
        # parent maybe disjoint
        for parentPart in parentParts:
            feature.parents.add(parentPart)
            parentPart.children.add(feature)