Jul-19-2019, 11:47 AM
I personally prefer avoid copying files whenever possible (except backup
).
If it's not some sort of backup solution then just an idea: one can use os.walk() to hardlink destination to same file in source. If file in source is changed the hardlink should hold (keeps same inode number on *nix and the file index on Windows). If file renaming occur then based on os.stat() attribute st_ino one should be able to update the filename. os.stat() should be cheaper than actual copying of files.

If it's not some sort of backup solution then just an idea: one can use os.walk() to hardlink destination to same file in source. If file in source is changed the hardlink should hold (keeps same inode number on *nix and the file index on Windows). If file renaming occur then based on os.stat() attribute st_ino one should be able to update the filename. os.stat() should be cheaper than actual copying of files.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.