Open JeromeSchmied opened 2 months ago
Thanks and good idea. The one potential issue with the simplest approach to this [see below] is I think it might take longer to delete files, right?
For example, right now we can get away with simply a fs::rename
for many cases which is very cheap:
But if we want to add more info to the record, like size and filecounts:
I think it would take longer.
Alternatively, maybe we could compute this on-the-fly? Like, if you do rip -s
, it could compute sizes by walking through the graveyard, rather than from the record. Wdyt?
Could even use the same code that e.g., dua-cli does for some of this.
I think the 2. solution you mentioned would be perfect.
So just compute sizes on-the-fly when rip -s
I wonder if it would be possible to simply pipe it to lsd
or something? https://github.com/lsd-rs/lsd
Then you could pass whatever arguments you would normally pass to ls
. I guess we would need to add something for 'time file was deleted' or something.
Good idea.
I'm looking at https://github.com/zhiburt/tabled/ for doing this.
looks like an amazing library
I also wonder if we could instead modify https://github.com/Byron/dua-cli to get some kind of interactive restoration... Seems like a fair amount of work though.
I've just installed this great tool, seems amazing.
One thing that would make it even better would be I think to show disk usage by
graveyard
. Something like withrip -i
, eg.rip -s
:or something.
Would be awesome.