Skip to content

Add omit_hidden option to readdir ? #38841

Open
@CameronBieganek

Description

@CameronBieganek

I couldn't find an issue for this. I was expecting there to be an optional keyword argument for readdir to omit hidden files and directories. Currently I'm doing this

function non_hidden_files(dir; kwargs...)
    files = readdir(dir; kwargs...)
    filter(!startswith(".")  basename, files)
end

which works for hidden files but not for hidden directories. It seems like it would be handy to have an omit_hidden or similar option for readdir.

I encountered this because of the pesky .DS_Store files on MacOS. 😂

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