3 ms·
How is the editor supposed to know the new filename?
by CrazyStat 5y ago
How is the editor supposed to know the new filename?
- bouke 5y agoTry renaming a file from the Finder currently open in Numbers (macOS). Notice how Numbers picks up the new name. So definitely possible, on macOS at least.
- laszlokorte 5y agoOn MacOS the file name is only meta data, ie the file has an internal id that does not change, but on other platforms filesystems the filename might be the identifier.
- mkj 5y agoIf it's renamed in Linux the inode number will remain the same. (Good luck finding where the new file is, I guess Sublime would spot it if it's within the currently opened directory/project with inotify)
- samus 5y agoEvery operating system supports subscribing to file and directory changes. That is how the editor can detect there was a change in the first place.