Serenity: find: find files by name

Created on 28 Nov 2020  路  5Comments  路  Source: SerenityOS/serenity

find is missing a -name command to find files by their file name.

Most helpful comment

Oh right, how could I forget about ::matches! Thanks, I'll submit an implementation soon then

All 5 comments

@bugaevc

Ah, yes, finding files by name would be cool. @alimpfard, how does one go about matching globs against file names, does the shell have an utility for this or something?

globs are available as StringUtils::matches()
the Shell can expand globs given a base path and a pattern with Shell::expand_globs(StringView path, StringView base) (this is static).

oh, did you mean that as a builtin? no, there's no dynamic glob resolution yet, I've had that on my wishlist though a "glob" builtin would be cool

Oh right, how could I forget about ::matches! Thanks, I'll submit an implementation soon then

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danboid picture danboid  路  9Comments

awesomekling picture awesomekling  路  6Comments

Lubrsi picture Lubrsi  路  4Comments

bgianfo picture bgianfo  路  6Comments

ZyorYT picture ZyorYT  路  6Comments