I m trying to find the unique id of a file which does not change upon modification of file or changing anything which works in multiOS. I cant use the name, path, file content hash as it can be modified.
I tried using inode id, st_ctime_ns but it changes. I need to monitor the file using the id of file system generated.
Changing on file modification:
file_uid = os.stat(file).st_ctime_ns
Changing if reran on another function
file_uid = os.stat(filename).st_ino
Does not work in unix
file_uid = popen(fr"fsutil file queryfileid {file}").read()