Open AndrewSav opened 8 years ago
Surely, the problem is cross-platform file & directory monitoring is a PITA. Any suggestions of libraries that would deal with that (in a portable way) would be great.
A quick search turned up https://github.com/howeyc/fsnotify, although I haven't used it before.
Two years old... but another aspect: For single-file saves watching for "last change" would probably work, but for save-directory... how would it be able to tell "ok, all has been saved, now is the time to back this up"? Unless "incremental backups"... but whole point of this tools is being simple.
You could look for files in data/save/current being deleted - DF should write them to there first, then copy them to the region folder.
Apparently much more complex to implement, but also much more useful is to have an ability for the program to monitor the saves folder and backup when changes (and/or on time interval).