mesalock-linux / mesabox

A collection of core system utilities written in Rust for Unix-like systems (and now Windows)
BSD 3-Clause "New" or "Revised" License
136 stars 19 forks source link

Implement globbing #11

Open Arcterus opened 6 years ago

Arcterus commented 6 years ago

We cannot use the globwalk crate as it does not support globbing for parent directories (i.e. paths like ../../* won't work). We will probably need to roll our own directory walker, either by using globset or modifying glob to support OsStrings.

Arcterus commented 6 years ago

I added support for non-UTF-8 filenames in glob, so I think we'll just use that. There are a couple of pull requests in the upstream repository that haven't been merged despite sitting there for a while, so we may want to fork the repository to merge in those changes.

Arcterus commented 6 years ago

This is also related to the IFS issue (#16) as we need to split the results of globbed expression based on IFS, so I will leave this open for now.