
On Tue, Jun 14, 2016 at 04:12:21PM +1000, Craig Sanders via luv-main wrote:
IMO the best option is to use a database to store information about the image [...] whilst storing the actual image in [...] a filesystem, with a hashed directory structure [...]
Agreed.
If you're worried about the image pathname getting out of sync with the database, you could write your own FUSE fs layered on top of the actual fs to automatically update the database if a file is renamed or moved. [...]
Rather than writing a FUSE, you could also use one of the inotify(7) tools to set up watches on these directories, see; inotifywait(1), inotifywatch(1) or incrond(8)/incrontab(5) – although that is Linux specific, and you'd need to handle directory tree recursion yourself. ~Joel