Skip to content

Allow listing files in a directory on native platforms #580

@StepanTheGreat

Description

@StepanTheGreat

A feature that's highly important for asset managers, since it's often required to know which files are present and which are not in a directory. There can of course be a lot of other possible uses for this.

The theoretical API could be simply a function that returns a vector of owned strings (file names inside the directory):

pub fn load_dir(path: &str) -> Vec<String>;

which ideally should even be able to return the results immediately, compared to load_file.

One downside is of course, that it can only be practically implemented on native platforms (since wasm lacks a file system). Still, I think even as a platform-specific feature, it could be extremely valuable for some users.

If this feature request fits the project's direction - I can later make a subsequent PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions