I would like to have some sort of file handle to a file that survives file moves/renames. This does not have to be platform independent, it's fine if it only works on Java7+linux, and even fine if the files can be assumed to not change directory.
The use-case is that I want to writer a log tailing input source similar to logstash-file-input, i.e. a tool that I can run to tail a file, and even if that file is rotated (i.e. moved/renamed) when my tailing application is down, I want to be able to find that file when the tailing application starts again.
I looked at BasicFileAttributes.fileKey but I haven't found any way to go from a fileKey to a File/Path object.
Does anyone know if this can be done?
Best Regards /Thomas