Provide "No such file or directory" error if file is not found.
Provide "Unknown Error" if other error found
Should reduce confusion from the generic other error
Pull out display code into different functions
Experimented with printing the actual directory currently being parsed
but this resulted into too many flickering hard to follow prints. It's
cleaner to just print the target directory rather than the directory
currently being examined by the dir_walker.
* v1.0
* renamed operations to be more clear
* put info later because there is still operations par of the preparing process
* updated the last line clearing
* changed name of module and structs to ones that make more sens
* Disable size computation when file_count option is set
* added sleep during the thread waiting
* use 1024 powered instead of 10 to compute showed number
* include DS_Store
* added files directories skipped information
* small format update
* implement the -H option
* put wait back
* remove PAtomicInfo since it's not used
* cargo fmt
* wrapped atomic operations to reduce overhead
* updated comments
* Use AtomicU64Wrapper instead of AtomicU64 in TotalSize
* update size suffix
* sto dividing size when larger than terabytes
* Fix use_iso flag not be set properly
* update properties display
* some reformating
* use stdout instead of print
* Moved config instance into main because it's easier to read
* merge base formatting into macro
* update name to be more intuitive and separated math operations for more flexibility
* print currently indexed path
* cargo fmt
* reset size between each target dirs
* Access to TotalSize rather than it's inner
* small comment change
* Update sysinfo version to 0.26.7
* fix: update use of sysinfo.system
System is now much quicker to start but requires an explicit call
to refresh memory else it deafults to 0 (oops)
* clippy: Fix new clippy
* fix: bug where hard links could be double counted
When running:
dust dir_a dir_b
if a file was hard linked in both dir_a and dir_b it would be double
counted.
This fix resolves this by keeping the shared hashmap around between runs
for the second and subsequent arguments.
https://github.com/bootandy/dust/issues/282
* Fix: depth=0 bug for multiple arguments
https://github.com/bootandy/dust/issues/282
* refactor filter.rs
* refactor filter.rs
* refactor create AggregateData for filter.rs
* feature: Support for dereference links -L follow
du has -L flag which allows it to dereference or follow
symlinks. Clone this feature into dust.
https://github.com/bootandy/dust/issues/276
* refactor dir_walker
I find this layout cleaner
* v1.0
* changed name of module and structs to ones that make more sens
* Disable size computation when file_count option is set
* added files directories skipped information
* implement the -H option
* wrapped atomic operations to reduce overhead
* used human_readable_number function in display module rather than our own
* implemented progress disabling
* cargo fmt & cargo clippy
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
Co-authored-by: andy.boot <bootandy@gmail.com>
When running:
dust dir_a dir_b
if a file was hard linked in both dir_a and dir_b it would be double
counted.
This fix resolves this by keeping the shared hashmap around between runs
for the second and subsequent arguments.
https://github.com/bootandy/dust/issues/282
- Try to use iterator adapters and collect in various places, where possible. This especially benefits draw_it.
- Try to use `.map` and other similar methods on Options and Results, where possible
- Replaced nearly all clones with reference-based equivalents
- Summarizing nodes by file extension is now much more efficient
- PartialOrd and PartialEq implementations now agree
- Replace #[cfg(...)] function definitions with simpler if cfg!(...) equivelents
- Simplify CLI Values handling by taking advantage of Values::default
- Various spelling corrections in comments
- Add `ColorState` enum to replace bool, for clarity
- Fix tests that break under some detected terminal widths when paths are long
- Use sort_by instead of (sort, reverse)
- Use new `ExtensionNode` struct internally to simplify extension aggregation code
Stop incorrect reporting of "Did not have permissions" this would
happen where dust is called with a file instead of a directory.
https://github.com/bootandy/dust/issues/241
todo: add test
Sort the Node objects so that duplicate inodes appear in a predictable
order.
Include new sort_by_inode method because this is notably quicker than
sorting by size & name as defined in the nodes.rs file.
Allow -n for number_of_lines to be used with -d 'max depth'
Remove depth specific functions, the job is now handled by the mainline
Add depth as a field onto the Node object.
The -e and -v flags allow multiple values. Before values after the first
were ignored. This change allows the user to specify multiple regexs and
have them all applied.
-t = Show summary of types
-e = Filter by regex
allows you to specify a file type like -e "\.txt$"
Change behaviour of '-f' flag - it now counts only files. Before it
counted files & directories. This was needed for compatibility with
the new '-e' filter flag