Returns a list of children of the given directory.
329631
function getChildren(fileRoot, directory, depth, excludes) {
        return fs.readdirAsync(directory)
        .then(function(files) {
            return Promise.map(files, function(file) {
                if (Array.isArray(excludes) && excludes.indexOf(file) !== -1) {
                    return null; // omit
                }
                var filepath = path.join(directory, file);
                return fs.statAsync(filepath)
                .then(function(stats) {
                    var isDir = stats.isDirectory();
                    return treeJSON(file, fileRoot, 0, isDir, depth ? depth - 1 : 0);
                })
                .catch(function() {
                    return null; // suppress rejection
                });
            });
        })
        .then(function(results) {
            return results.filter(function(r) { return r; });
        });
    }
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))]
415689
def getChildren(current,calls,blacklist=[]):
    '''  '''
    return [c.target for c in calls if c.source==current and c.target not in blacklist]
1255698
def listdir(self, pathobj):
        
        stat = self.stat(pathobj)

        if not stat.is_dir:
            raise OSError(20, "Not a directory: %s" % str(pathobj))

        return stat.children
592906
def get_children(self, path, watch=None):
        
        return self._zk.get_children(self.__path(path), watch=watch)
71604
def recursively_get_files_from_directory(directory):
    
    return [
        os.path.join(root, filename)
        for root, directories, filenames in os.walk(directory)
        for filename in filenames
    ]
148053
def get_children(self):
        """"""
        if hasattr(self, '_cached_children'):
            children = self._toplevel().objects.filter(
                pk__in=[n.pk for n in self._cached_children]
            )
            children._result_cache = self._cached_children
            return children
        else:
            return self.get_descendants(include_self=False, depth=1)
1343074
public function get_children() {
        if (!$this->lf->is_directory()) {
            return array();
        }

        $result = array();
        $fs = get_file_storage();

        $storedfiles = $fs->get_directory_files($this->context->id, 'course', 'legacy', 0, $this->lf->get_filepath(), false, true, "filepath ASC, filename ASC");
        foreach ($storedfiles as $file) {
            $result[] = new file_info_area_course_legacy($this->browser, $this->context, $file);
        }

        return $result;
    }
942865
def _fetchAllChildren(self):
        
        childItems = []
        if self._array.ndim == 2:
            _nRows, nCols = self._array.shape if self._array is not None else (0, 0)
            for col in range(nCols):
                colItem = SliceRti(self._array[:, col], nodeName="channel-{}".format(col),
                                   fileName=self.fileName, iconColor=self.iconColor,
                                   attributes=self.attributes)
                childItems.append(colItem)
        return childItems
718091
def get_children(self, usage_id_filter=None):
        
        if not self.has_children:
            return []

        return [
            self.get_child(usage_id)
            for usage_id in self.children
            if usage_id_filter is None or usage_id_filter(usage_id)
        ]
633300
public static List<File> findFilesWithFilter(final File dir, final String... extension)
	{
		final List<File> foundedFileList = new ArrayList<>();
		final File[] children = dir.listFiles(new MultiplyExtensionsFileFilter(true, extension));
		for (final File element : children)
		{
			// if the entry is a directory
			if (element.isDirectory())
			{ // then
				// find recursively in the directory and put it in a List.
				// Put the founded files in the main List.
				foundedFileList.addAll(findFilesWithFilter(element, extension));
			}
			else
			{
				foundedFileList.add(element.getAbsoluteFile());
			}
		}
		return foundedFileList;
	}
433353
def get_children(self, path, watch=None):
        """"""
        _log.debug(
            "ZK: Getting children of {path}".format(path=path),
        )
        return self.zk.get_children(path, watch)
1339312
def get_children(self, depth=1):
        """"""
        yield self
        if depth == 0: return
        for child in self.children.values():
            for node in child.get_children(depth-1): yield node
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
1233942
def _get_files_recursively(rootdir):
    
    output = []
    for root, dirs, files in os.walk(rootdir):
        for filename in files:
            output.append(os.path.join(root, filename))

    return output
477201
def get_children(self):
        """"""
        next_zoom = self.zoom + 1
        return [
            self.tile_pyramid.tile(
                next_zoom,
                self.row * 2 + row_offset,
                self.col * 2 + col_offset
            )
            for row_offset, col_offset in [
                (0, 0),  # top left
                (0, 1),  # top right
                (1, 1),  # bottom right
                (1, 0),  # bottom left
            ]
            if all([
                self.row * 2 + row_offset < self.tp.matrix_height(next_zoom),
                self.col * 2 + col_offset < self.tp.matrix_width(next_zoom)
            ])
        ]
1177864
def get_subdirs(directory):
    
    return [os.path.join(directory, name)
            for name in os.listdir(directory)
            if os.path.isdir(os.path.join(directory, name))]