Use the whole width of the terminal assume width of 80 if none found
Show percentages in the final column. Show ASCII bars indicating usage
of the underlying directories in the space inbetween.
Display (height of terminal - 10) entries by default.
Reverse the output order so largest is at the bottom.
Break up tests. Change older tests to check real output of program.
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.