This code now won't compile on none-(windows/unix family)
systems. [unix family includes mac]
Removing this method allows us to remove an Option and simplify the code
slightly
.# [why]
"If you use `from_path()` on a directory, then subsequent queries using that handle will fail."
Instead, use `from_path_any()` which supports opening files or directories.
ref: "Struct winapi_util::Handle" from <https://docs.rs/crate/winapi-util>
The MetadataExt functions are nightly-only right now so we need to call
the windows api ourselves to get the device number. The winapi_util
package has a nice wrapper to do this for us.
The get_device function doesn't appear to be used anywhere so I removed
it.
https://github.com/bootandy/dust/issues/46
Add -X flag used to ignore any file or directory that matches the
provided substring.
This means that -X e will ignore any file or directory with an 'e' in
it.
Force dust to use 2 threads if there is only 1 cpu
JWalk breaks if it tries to run on a single cpu
https://github.com/jessegrosjean/jwalk/issues/15
This is a hack because I can't figure out how to fix JWalk.
This code and the num_cpu crate can be removed when the bug is fixed
Also I have conflated cpus with cores while describing this issue. It is
very difficult to test as I don't have a single core machine.
Removes unwrap and returns a Result instead of panicing if an invalid
path is given.
Previously if the flag: '-x' was provided with an argument of an
invalid directory the code would crash here
https://github.com/bootandy/dust/issues/50
Add optional -x flag to limit search to the current filesystem.
Add (untested) support for windows for the equivalent of inode and
device.
* Initialize ansi_term if we're on windows
* Silence build warning on non-unix targets
* Update ansi-term which has windows specific fixes (and assert_cli while I'm at it)
New assert_cli library requires we cast the param passed to 'is()' as
it can no longer cast implicitly. I am guessing this is because it is
due to confusion between whether to cast to u8 or str