It depends on how the editor save function is implemented. Each editor will have different functionality, and it sounds like you are using the following:
- Delete existing file.
- Create a new file.
- Writing file data.
Therefore, you get a new index every time. Others may:
- Trim an existing file.
- Writing file data.
which will lead to the same inode every time.
You can't do anything about this, so you will need to track file changes using a name or something, not an inode.
source
share