Creates child entities in directory.

        Raises exception if the object is a file.

        :param children: The list of children to be created.
        :return: The child object, if one child is provided. None, otherwise.
509110
def mkdir(self, children, mode=0o0755, return_node=True):
        
        result = None

        if isinstance(children, (str, unicode)):
            if os.path.isabs(children):
                raise BadValueError('Cannot mkdir an absolute path: {path}'.format(path=self._pyerarchy_path))

            rel_path = os.path.join(self._pyerarchy_path, children)
            os.makedirs(rel_path, mode)

            if return_node:
                result = Node(rel_path)
        else:
            for child in children:
                self.mkdir(child, mode, False)

        return result
145768
def get_child_files(path):
        '''  '''
        path = FileHelper.abspath(path)
        return [filename for filename in os.listdir(path) if os.path.isfile(os.path.join(path, filename))]
490402
def _fetchAllChildren(self):
        
        childItems = []
        logger.debug("{!r} _fetchAllChildren {!r}".format(self, self.fileName))

        if self.hasChildren():
            for key, value in sorted(self._dictionary.items()):
                # TODO: pass the attributes to the children? (probably not)
                childItem = _createFromObject(value, str(key), self.fileName)
                childItem._iconColor = self.iconColor
                childItems.append(childItem)

        return childItems
498098
def set_children(self, children):
        """"""
        if isinstance(children, tuple):
            self._children = list(children)
        else:
            self._children = [children]
        return self
744741
def get_children_metadata(self):
        
        metadata = dict(self._mdata['children'])
        metadata.update({'existing_children_values': self._my_map['childIds']})
        return Metadata(**metadata)
794412
def children(self, recursive=False):
        
        for i in xrange(self.childCount()):
            child = self.child(i)
            yield child
            
            if recursive:
                for subchild in child.children(recursive=True):
                    yield subchild
101164
def _fetchAllChildren(self):
        
        assert self.isSliceable, "No underlying pandas object: self._ndFrame is None"

        childItems = []

        for subName in self._ndFrame.columns: # Note that this is not the first dimension!
            childItem = PandasSeriesRti(self._ndFrame[subName], nodeName=subName,
                                        fileName=self.fileName, iconColor=self._iconColor,
                                        standAlone=False)
            childItems.append(childItem)

        if self._standAlone:
            childItems.append(self._createIndexRti(self._ndFrame.index, 'index'))
            childItems.append(self._createIndexRti(self._ndFrame.columns, 'columns'))

        return childItems
486858
def get_children(self):
        """"""
        try:
            children = os.listdir(self.real_path)
        except OSError:
            return []
        result = []
        for name in children:
            try:
                child = self.get_child(name)
            except exceptions.ResourceNotFoundError:
                continue
            if not self.project.is_ignored(child):
                result.append(self.get_child(name))
        return result
708860
def add_child(*names)
      names.flatten!
      return unless name = names.shift
      node = children.find { |c| c.name == name }
      node ? node.add_child(names) : (children << TreeNode.new(name, names))
    end
1298403
private List<File> listFiles(File file, List<File> files) {
        File[] children = file.listFiles();
        
        if (children != null) {
            for (File child : children) {
                files.add(child);
                listFiles(child, files);
            }
        }
        
        return files;
    }
1015071
def child(self):
        
        return self.stream.directory[self.child_id] \
            if self.child_id != NOSTREAM else None
638121
public void setChildren(List<CmsGalleryTreeEntry> children) {

        m_children = children;
        for (CmsGalleryTreeEntry child : m_children) {
            child.setParent(this);
        }
    }
1097466
def add_child(self, child):
        
        if not isinstance(child, DependencyNode):
            raise TypeError('"child" must be a DependencyNode')
        self._children.append(child)
342948
def add_from_child(self, resource, **kwargs):
        

        new_resource = self.add(
            resource.member_name, resource.collection_name, **kwargs)
        for child in resource.children:
            new_resource.add_from_child(child, **kwargs)
1047156
def getchildren(self):
        '''
        
        '''
        try:
            if self.hidden:
                return [os.path.join(self.name, child)
                        for child in sorted(self.listdir(self.name))]
            else:
                return [os.path.join(self.name, child)
                        for child in sorted(os.listdir(self.name))]
        except OSError:
            return None
1187966
def add_children(self, frames, after=None):
        '''
        
        '''
        if after is not None:
            # if there's an 'after' parameter, add the frames in reverse so the order is
            # preserved.
            for frame in reversed(frames):
                self.add_child(frame, after=after)
        else:
            for frame in frames:
                self.add_child(frame)
453666
def children(self):
        

        if isinstance(self.content, list):
            return self.content
        elif isinstance(self.content, Element):
            return [self.content]
        else:
            return []