Skip to content

MemFS ReadDir doesn't list entries sorted by filename #12

@MetalBlueberry

Description

@MetalBlueberry

By the interface definition of ReadDir

// ReadDir reads the directory named by dirname and returns a list of
// directory entries sorted by filename.
ReadDir(path string) ([]os.FileInfo, error)

The current implementation returns the files in random order because it is retrieved from a map in a for loop. This can be fixed by sorting the result. I will submit a PR.

Thank you for this awesome project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions