A convenience method which coerces the option in the specified section to a list of directories.
12479
def getdirs(self, section, option, raw=False, vars=None, fallback=[]):
        
        globs = self.getlist(section, option, fallback=[])
        return [f for g in globs for f in glob.glob(g) if os.path.isdir(f)]
29347
def directory(self, dir_key):
    ''''''
    dir_items = self.get(dir_key)
    if not isinstance(dir_items, list):
      self.put(dir_key, [])
1180862
def ConfigSectionMap(Config, section):
    
    cfg = {}
    options = Config.options(section)
    for option in options:
        try:
            cfg[option] = Config.get(section, option)
            if cfg[option] == -1:
                logging.debug("skip: {0}".format(option))
        except:
            logging.debug("exception on {0}!".format(option))
            cfg[option] = None
    return cfg
213839
function coerceOptions (opts) {
  return fp.pipe(
    () => (fp.isEmpty(opts) ? {} : opts),
    opts => (fp.isString(opts) ? { name: opts } : opts),
    opts => fp.set('name', fp.getOr(APP_NAME, 'name', opts), opts),
    opts => fp.set('base', extrasToBase(opts), opts),
    fp.pick(WHITELISTED_FIELDS),
    opts => Object.assign({}, DEFAULTS, opts)
  )()

  function extrasToBase (opts) {
    const current = fp.getOr({}, 'base', opts)
    const extras = fp.omit(BLACKLISTED_FIELDS, opts)
    return Object.assign({}, current, extras)
  }
}
221835
public static List<File> listFilesRecursively(File dir) {
		List<File> fileList = newArrayList();
		addFilesRecursively(dir, fileList);
		return fileList;
	}
564967
private static Collection<File> findDirsRecursively(File dir) {
		return FileUtils.listFilesAndDirs(dir, FalseFileFilter.FALSE, TrueFileFilter.TRUE);
	}
720373
def config_args(self, section="main"):
        
        if self._config_parsed:
            return
        for a in self._filtered_actions("config"):
            for o in a.option_strings:
                try:
                    i = sys.argv.index(o)
                    sys.argv.pop(i)  # remove the option string
                    sys.argv.pop(i)  # remove the value that follows
                except ValueError:
                    pass
        for a in self._sorted_actions():
            self._set_arg(a, section, True)
        self._config_parsed = True
589067
public static File[] listFilesSortedByModDate(File dir) {
        File[] backupDirFiles = dir.listFiles();
        Arrays.sort(backupDirFiles, new FileComparator());
        return backupDirFiles;
    }
1341707
public static Optional<List<String>> getStringListOptional(Config config, String path) {
        return Optional.ofNullable(getStringList(config, path));
    }
603151
function readDirAbs(dir, cb) {
  fs.readdir(dir, function(err, entries) {
    if (err || !entries) {
      return cb(err, null);
    }
    var items = [];
    entries.forEach(function(entry) {
      items.push(path.join(dir, entry));
    });
    return cb(null, items);
  });
}
195090
def foldx_dir(self):
        """"""
        if self.root_dir:
            return op.join(self.root_dir, self._foldx_dirname)
        else:
            log.warning('Root directory not set')
            return None
246627
function parseChangeDirectoryOptions (options) {
		var parsedOptions = {
			'changeDir': false,
			'path': '/',
		};
		if(options) {
			if(options.path) {
				parsedOptions.path = options.path;
				parsedOptions.changeDir = true;
			}
		}
		return parsedOptions;
	}
607392
def section(self, section, skip=['type', 'order']):
        
        return [(key, val) for key, val in self.parser.items(section)
                if key not in skip]
392802
def split_option(self, section, option):
		
		value = self[section][option].strip()
		if value == "":
			return []
		return [x.strip() for x in (value.split(","))]
761704
def items(self, section_name):
        """"""
        return [(k, v) for k, v in super(GitConfigParser, self).items(section_name) if k != '__name__']
301272
function (dir, filelist, extensions, ignore) {
    const files = fs.readdirSync(dir);
    filelist = filelist || [];
    files.forEach(function (file) {
        const ext = fileExtension(file);
        if (ignore.indexOf(ext) === -1) {
            if (fs.statSync(path.resolve(dir, file)).isDirectory()) {
                filelist = walkSync(path.join(dir, file, "/"), filelist, extensions, ignore);
            }
            else {
                if (extensions.indexOf(ext) !== -1) {
                    filelist.push(path.join(dir, file));
                }
            }
        }
    });
    return filelist;
}
920878
def ListDirectoryAbsolute(directory):
  """"""
  return (os.path.join(directory, path)
          for path in tf.io.gfile.listdir(directory))