* remove unneeded identity .map()
* remove redunant field name in struct
* impl num_siblings for Node
* replace nested if w/ match in get_tree_chars
* remove unneeded field name in struct
* remove redundant println! & logic in display_node
* make get_children_from_node a Node method
* Revert "remove redundant println! & logic in display_node"
This reverts commit 40777025d5.
Change the depth flag so that it only changes the depth of displayed
subdirectories, not the depth of the directory size calculation (i.e.,
changing --depth does not change the displayed directory size, rather it
only changes how many levels of subdirectories are shown).
From feature request to respect the .gitignore file. Decided to bundle in
respect for hidden files into the same feature [otherwise if you obey
the .gitignore file you still endup showing the .git directory]
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
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.
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.
When one directory was a substring of another the directory would appear
as a subdirectory instead of a sibling
Fixed originally by this: 6e03dd77e6
Broken by this: db6c8a019d
Added integration test as this has bitten me before
Following the large refactor on the previous commit, this commit fixes
the reverse functionality.
Depth detection moved into the tree building instead of being calculated
when drawing the tree to screen
WIP
Replace array of (string, int) pairs with tree of nodes.
A tree of nodes more accurately represents the underlying file structure
and hence is a better fit for the problem space.
Regression: Reverse doesn't work in this commit.
I suspect more methods can be simplifed and reduced.
strip_end_slash_including_root will remove end slashes including the
root directory.
The root directory has been a long running problem because if we strip
the final slash we will run dust on no directory instead of the root.