Skip to content

If opened file is deleted by external program then that should be reflected in mousepad

Hello!

Use-case:

  1. User opens foo.txt in mousepad
  2. Does some editing + save
  3. An external program deletes foo.txt from the disk

Then mousepad should:

  1. reflect the fact that foo.txt is not saved (is not on disk) by changing the title color and appending *
  2. Should present "Save changes" dialog if user tries to close mousepad and opened file was deleted by external program

I think 1. needs periodic polling while 2. can be achieved by checking whether the file is there on disk while closing the opened file.

Thanks!