The new Colorable trait exposes accessors for file name, type, and
metadata. LsColors::style_for_path() and ..._with_metadata() are now
implemented in terms of style_for(Colorable).
With file type potentially separated from metadata, the indicator_for()
implementation is careful to only call metadata() when actually
necessary to color the file. The new Colorable impl for DirEntry takes
advantage of this, potentially avoiding a stat() call when d_type is
sufficient.
The new Colorable trait exposes accessors for file name, type, and metadata. LsColors::style_for_path() and ..._with_metadata() are now implemented in terms of style_for(Colorable).
With file type potentially separated from metadata, the indicator_for() implementation is careful to only call metadata() when actually necessary to color the file. The new Colorable impl for DirEntry takes advantage of this, potentially avoiding a stat() call when d_type is sufficient.
Fixes #42.