I read in another question that all the files in the directory are deleted during an update and this is bad design. Got it. Prevent plugin from deleting important directories
Is it possible to not modify one of my plugin's files during an update? I have a text file in the plugin directory into which the user has entered data.
The reason my users have edited one of the files is twofold:
- I don't like admin pages for simple plugins
- The plugin editor makes it easy for users to make text file edits
Can I get the file contents before the file is deleted? Can I preserve that file in any way with an update by checking it's modified date and copying it before it dies?