Implementation of the parent abstract method.
        In this mode the attribute is a file inside the parent object folder

        :param parent_item_prefix: the absolute file prefix of the parent item.
        :return: the file prefix for this attribute
547573
def get_multifile_object_child_location(self, parent_item_prefix: str, child_name: str) -> str:
        
        check_var(parent_item_prefix, var_types=str, var_name='parent_item_prefix')
        check_var(child_name, var_types=str, var_name='item_name')

        # assert that folder_path is a folder
        if not isdir(parent_item_prefix):
            raise ValueError(
                'Cannot get attribute item in non-flat mode, parent item path is not a folder : ' + parent_item_prefix)
        return join(parent_item_prefix, child_name)
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')
238681
def prefix(self, name):
        
        a_node = self.adapter.get_node_attribute_node(self.impl_element, name)
        if a_node is None:
            return None
        return a_node.prefix
967127
def get(self, item):
        
        e = self._deps.get(item)
        if e is None:
            return self.get_default()
        return e.parent
72527
def parent(self):
        
        p = self._lib.dirname(self.path)
        p = self.__class__(p)
        return p
621952
def GetParentFileEntry(self):
    
    volume_index = lvm.LVMPathSpecGetVolumeIndex(self.path_spec)
    if volume_index is None:
      return None

    return self._file_system.GetRootFileEntry()
301798
def get_parent_object(self, parent_queryset=None):
        
        if self._parent_object_cache is not None:
            return self._parent_object_cache

        if parent_queryset is None:
            parent_queryset = self.get_parent_queryset()

        if self.parent_model is None:
            raise ImproperlyConfigured(
                "'%s' must define 'parent_model'" % self.__class__.__name__
            )

        if self.parent_lookup_field is None:
            raise ImproperlyConfigured(
                "'%s' must define 'parent_lookup_field'" % self.__class__.__name__  # noqa
            )

        lookup_url_kwarg = '_'.join([
            self.parent_model_name or self.parent_model._meta.model_name,
            self.parent_lookup_field
        ])

        lookup = self.kwargs.get(lookup_url_kwarg, None)

        if lookup is not None:
            filter_kwargs = {self.parent_lookup_field: lookup}

        else:
            raise ImproperlyConfigured(
                'Expected view %s to be called with a URL keyword argument '
                'named "%s". Fix your URL conf, or set the '
                '`parent_lookup_field` attribute on the view correctly.' %
                (self.__class__.__name__, lookup_url_kwarg)
            )

        obj = get_object_or_404(parent_queryset, **filter_kwargs)

        self.check_parent_object_permissions(self.request, obj)
        self._parent_object_cache = obj

        return obj
273393
def parent(self, value):
        

        if value is not None:
            assert issubclass(value.__class__, AbstractNode), "'{0}' attribute: '{1}' is not a '{2}' subclass!".format(
                "parent", value, AbstractNode.__class__.__name__)
        self.__parent = value
794614
def root_parent(self, category=None):
        
        return next(filter(lambda c: c.is_root, self.hierarchy()))
313668
def set_parent(self, parent):
        
        self.parent = parent

        if self.config_type == 'edit':
            self.rel_path_fwd = 'edit %s\n' % self.get_name()
            self.rel_path_bwd = 'next\n'
        elif self.config_type == 'config':
            self.rel_path_fwd = 'config %s\n' % self.get_name()
            self.rel_path_bwd = 'end\n'

        self.full_path_fwd = '%s%s' % (self.get_parent().full_path_fwd, self.rel_path_fwd)
        self.full_path_bwd = '%s%s' % (self.rel_path_bwd, self.get_parent().full_path_bwd)
122478
def GetParentFileEntry(self):
    
    # If the file entry is a sub entry, return the SQLite blob directory.
    if self._is_virtual:
      return None

    path_spec = sqlite_blob_path_spec.SQLiteBlobPathSpec(
        table_name=self.path_spec.table_name,
        column_name=self.path_spec.column_name,
        parent=self.path_spec.parent)
    return SQLiteBlobFileEntry(
        self._resolver_context, self._file_system,
        path_spec, is_root=True, is_virtual=True)
1315497
def visit_file(self, item, parent):
        
        if item.need_to_send:
            if item.size > self.settings.config.upload_bytes_per_chunk:
                msg = "Programmer Error: Trying to upload large file as small item size:{} name:{}"
                raise ValueError(msg.format(item.size, item.name))
            else:
                command = CreateSmallFileCommand(self.settings, item, parent,
                                                 self.settings.file_upload_post_processor)
                self.task_runner_add(parent, item, command)
1338840
def get_item_name(self, item, parent):
        
        names = self.get_name_elements(item)
        if not names:
            raise MissingNameElementError

        name = names[0].text
        prefix = self.item_name_prefix(parent)
        if prefix:
            name = prefix + name

        return name
1337882
def parent(self, index):
        
        if not index.isValid():
            return QtCore.QModelIndex()

        childItem = index.internalPointer()
        # the only place where the parent item is queried
        parentItem = childItem.getParent()

        if parentItem == self.root:
            return QtCore.QModelIndex()

        return self.createIndex(parentItem.row(), 0, parentItem)
482541
def visit_folder(self, item, parent):
        
        if item.sent_to_remote:
            self._add_report_item(item.path, item.remote_id)
912933
def get_parent_folder(self):
        
        if self.root:
            return None
        if self.parent:
            return self.parent

        if self.parent_id:
            self.parent = self.get_folder(folder_id=self.parent_id)
        return self.parent
1310752
def findFileRtiIndex(self, childIndex):
        
        parentIndex = childIndex.parent()
        if not parentIndex.isValid():
            return childIndex
        else:
            parentItem = self.getItem(parentIndex)
            childItem = self.getItem(childIndex)
            if parentItem.fileName == childItem.fileName:
                return self.findFileRtiIndex(parentIndex)
            else:
                return childIndex