Chris-Dobbins / listdupes

A duplicate file checking utility for the command-line, written in Python with no external dependencies.
BSD 2-Clause "Simplified" License
2 stars 0 forks source link

Save/Resume Feature #12

Closed Chris-Dobbins closed 2 years ago

Chris-Dobbins commented 2 years ago

Right now I’m imagining implementing this with two new argument flags:

  1. Something called like --store, which would make a .json file that contains all the paths contained within a folder (In other words it would store the work listdupes does during its “Gathering files…” phase) and then quit once that work is done. The json file should also store the date of its creation.

  2. Something like --read, which would read files listed in that .json file, checksum files as usual, and cache the resulting checksums in another .json file (Probably a unix style invisible dotfile since it’s a temporary cache). The --read flag should notify the user if a notably old file is being read. ("This file is over a week old", "This file is over a month old" etc.

So if the application is quit while being run with the --read argument it would stop reading stored paths, write any remaining checksums to the cache file along with the index it's on, and then quit.

It should also be possible for listdupes to make an intelligent guess about when a server or other external volume it's reading from has been disconnected, and quit after a relatively long period of disconnection (Say 1 second). In which case, the next time it's started with --load, it should resume its work from before the disconnection.

Chris-Dobbins commented 2 years ago

Implemented in v6.0.0 Beta 1