Commit Graph

206 Commits

Author SHA1 Message Date
andy.boot
02fa657128 Update readme 2020-02-20 20:36:35 +00:00
andy.boot
bc0e376c88 New Version v0.5.0 2020-02-19 20:22:54 +00:00
andy.boot
d7c602a2d2 Merge pull request #72 from bootandy/ab-redesign
Large redesign
2020-02-19 20:19:50 +00:00
andy.boot
603e6be7eb Large redesign
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.
2020-02-18 20:58:53 +00:00
andy.boot
efa469e12f Merge pull request #67 from bootandy/ab-simplify-inodes2
Simplify inodes & devices by removing Option
2020-02-10 22:11:35 +00:00
andy.boot
657858df16 Simplify inodes & devices by removing Option
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
2020-02-09 14:33:46 +00:00
andy.boot
a8d700d530 Merge pull request #66 from bootandy/ab-refactor
Refactor code
2020-02-09 14:27:05 +00:00
andy.boot
c408d8887d Update docs for -X flag.
-X flag changed subtly with previous pull request. It now requires a
directory name and doesn't work on substrings.
2020-02-09 14:10:53 +00:00
andy.boot
be2250d241 Refactor: use if let instead of is_some 2020-02-09 14:10:53 +00:00
andy.boot
b6aa1378de Fix bug for devices and apparent size
If apparent_size was set and ignore files on other devices was set then
the latter flat would not work.

Fix this bug
2020-02-09 13:57:08 +00:00
andy.boot
2082141dfc Add tests for should_ignore_file function
function currently has a bug that is highlighted by second test
2020-02-09 13:57:08 +00:00
andy.boot
8a9b5e889d Refactor path depth calculation
Factor out duplicate code,
Add comment explaining why filter is necessary (thanks to rivy)
2020-02-09 13:57:08 +00:00
andy.boot
871b7e90d8 Merge pull request #64 from rivy/rf.path
Refactor ~ use Path/PathBuf instead of &str/String
2020-02-09 13:52:11 +00:00
andy.boot
edf300893c Increment version 2020-02-09 10:08:41 +00:00
Roy Ivy III
a3d8fc00e1 Refactor ~ use AsRef<Path> where possible 2020-02-03 16:56:50 -06:00
Roy Ivy III
9d4531d48b Refactor ~ use PathBuf instead of String 2020-02-03 16:56:47 -06:00
andy.boot
75e419e7ed Update README.md
Remove section on performance, I can not replicate this and don't want to cause controversy.
v0.4.5.0
2020-02-03 20:54:19 +00:00
andy.boot
4a62fc5726 Update README.md
include dutree in alternatives
2020-02-03 20:52:12 +00:00
andy boot
d2b959fdcf Merge pull request #62 from rivy/add.gha
Fix windows compilation and testing
v0.4.41
2020-02-03 20:31:37 +00:00
Roy Ivy III
36ebb1b2b0 refactor ~ strip_trailing_curdirs() -> normalize_path() (a more accurate descriptor) 2020-01-29 18:36:13 -06:00
Roy Ivy III
e126a01096 Tests ~ improve portability of tests for 'Fix ~ improve portability of path manipulation' 2020-01-29 18:36:13 -06:00
Roy Ivy III
7a38a26593 Fix ~ (WinAPI) must use Handle::from_path_any() if target path might be a directory
.# [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>
2020-01-29 18:36:13 -06:00
Roy Ivy III
1af6e1f757 Tests ~ simplify by ignoring instead of skipping tests for 'Tests ~ disable two symlink tests which may not be possible on 'windows'' 2020-01-29 18:36:13 -06:00
Roy Ivy III
affafcc5f2 Tests ~ simplify by ignoring instead of skipping tests for 'Tests ~ temporarily disable tests which vary by 'windows' hosts' 2020-01-29 18:36:13 -06:00
Roy Ivy III
26ef8c3e59 Tests ~ add test case to 'Fix ~ improve portability of path manipulation' 2020-01-29 18:36:13 -06:00
Roy Ivy III
0898ee6bf0 Maint/CI ~ temporarily disable non-working cargo tarpaulin test coverage 2020-01-29 18:36:13 -06:00
Roy Ivy III
5ac168868e Tests ~ temporarily disable tests which vary by 'windows' hosts 2020-01-29 18:36:13 -06:00
Roy Ivy III
684994ee11 Tests ~ disable two symlink tests which may not be possible on 'windows' 2020-01-29 18:36:12 -06:00
Roy Ivy III
416ad517fe Tests ~ fix windows testing 2020-01-29 18:36:12 -06:00
Roy Ivy III
7c34389aea Fix ~ improve portability of path manipulation 2020-01-29 18:36:12 -06:00
Roy Ivy III
18510130d8 Maint/CI ~ add GitHub-Actions CI (aka GHA) 2020-01-29 18:36:12 -06:00
andy boot
0bf8c914b7 Merge pull request #59 from Celti/exclude-multiple
Allow multiple --ignore-directory flags
2020-01-21 23:32:49 +00:00
Celti Burroughs
95888d5f31 Allow multiple --ignore-directory flags 2020-01-21 15:40:04 -07:00
andy boot
5d195e27cb Merge pull request #61 from lespea/fixWinBreaks
Fix get_metadata on windows
2020-01-21 22:06:00 +00:00
Adam Lesperance
0c7b05fec9 Fix get_metadata on windows
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.
2020-01-21 00:06:41 -06:00
andy boot
bc895879e6 Update README.md 2020-01-20 23:36:59 +00:00
andy boot
31f01c061a Update README.md 2020-01-19 09:55:51 +00:00
andy boot
17894e723c Merge pull request #55 from bootandy/ab-neaten
Ab fix clippy warnings, increment version number
2020-01-19 09:51:33 +00:00
andy boot
6141ddddea Merge pull request #54 from bootandy/ab-ignore-dir
Add option to ignore directories
2020-01-19 09:35:04 +00:00
andy.boot
352c0f7d90 Increment version number v0.4.4 2020-01-19 09:32:49 +00:00
andy.boot
842a8ec673 Clean up clippy warnings 2020-01-19 09:32:35 +00:00
andy.boot
d97edba041 Add option to ignore directories
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.
2020-01-19 09:23:13 +00:00
andy boot
f64e0094f1 Merge pull request #53 from bootandy/single_cpu
Fix dust for single core machines
2020-01-18 23:06:28 +00:00
andy.boot
3d2477e554 Allow dust to run on single core machines
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.
2020-01-18 22:04:08 +00:00
andy.boot
350d695f7c Add num_cpus as Cargo dependency
Will be used to detect single core computers which crash Jwalk
2020-01-18 21:57:11 +00:00
andy boot
f8b8b8a788 Merge pull request #51 from bootandy/ab-exclude
Support excluding filesystems with -x
2020-01-18 21:54:41 +00:00
andy.boot
b9c27f9838 get_filesystem returns Result instead of option
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
2020-01-16 23:50:56 +00:00
andy.boot
5541df6a73 Refactor code
Reduce complexity of examine_dir.

No logic changes
2020-01-15 20:10:33 +00:00
andy.boot
bdc3d404ef Support excluding filesystems with -x
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.
2020-01-15 19:51:16 +00:00
andy boot
f395a7d768 Merge pull request #49 from bootandy/ab-upgrade
Upgrade libraries. Fix assert_cli
v0.4.3
2019-12-30 22:07:04 +00:00