Search code examples
javaandroidsharedpreferencesandroid-sharedpreferences

When are the .xml.bak files in shared_prefs created/used?


I'm deleting an .xml shared preference file and its .xml.bak file as indicated here, but the .xml.bak file never seems to exist. I've checked after the shared preference has been populated with data, cleared, and deleted. When is the .xml.bak files used or created?


Solution

  • As far as I know, ,bak files are backup files created by svn and git-svn. If you are using one of these versioning systems, .bak files may be created when you merged two or more versions of your file. They may also be created at times when there are conflicts in the local and remote copies of the file do not match. I have seen .bak also created sometimes when I created and applied svn-patch using command line.

    For more info, refer : https://www.simple-talk.com/dotnet/net-framework/tortoisesvn-and-subversion-cookbook-part-2-file-operations-and-subversion-filtering/