public function children($ignore = null, $plain = false)
{
$raw = $this->scan($ignore);
if ($plain) {
$content = array();
foreach ($raw as $file) {
if (is_dir($this->root . DS . $file)) {
$content[] = $file;
}
}
} else {
$content = new Collection();
foreach ($raw as $file) {
if (is_dir($this->root . DS . $file)) {
$content->append($file, new static($this->root . DS . $file));
}
}
}
return $content;
}