I used Java to record the inode of the files to database on Mac OS X 10.9. And I used the filekey() method of BasicFileAttribute class to make it. However, I discovered that once I changed the content of the file, like a txt, the in ode value changed, too. No matter I use vim or GUI, the results are still the same. Here is the way I make it.
Path fp = files.get(i).toPath();
BasicFileAttributes attrs = Files.readAttributes(fp,BasicFileAttributes.class);
String fk_fs = attrs.fileKey().toString();
Can anyone tell me why? Thank you very much. BTW, forgive my poor English :-)