-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Mod
has get_file
, which is great for getting the contents of a particular named file. However, certain processes (localization + migrations) are filename agnostic - meaning that their location in some folder indicates their function instead of their filename. In these cases, it would be much nicer to give a folder and return a iterator containing all of the files/folders inside of it (probably alphabetically). Essentially, this would be a fs::read_dir
equivalent:
let some_mod: Mod = ...;
let english_locale = some_mod.read_dir("locale/en")?;
for filename in english_locale {
let data = mod.get_file(filename)?;
// ...
}
This should be pretty easy to implement, so I'm willing to contribute a PR if you don't have any complaints.
Metadata
Metadata
Assignees
Projects
Status
Ready