title: Are Internal Storage Files Deleted on App Update?
body: <p>It is known that:</p>
  
  <blockquote>
    <p>When the user uninstalls your app, the system removes all your app's
    files from internal storage.</p>
  </blockquote>
  
  <p>Does the same thing happens when the user update the app?</p>
  
  <p><hr>
  <strong>Why Am I asking?</strong> I have a file in the <code>raw/</code> folder which I move to the Internal Storage every time my app is run (if it is not already been moved):</p>
  
  <pre><code>//On Application onCreate() method:
  InputStream jsonFile = ctx.getResources().openRawResource(R.raw.data);
  File file = ctx.getFileStreamPath(Helper.FILE_NAME);
  if(file.exists())
      return; //Exit because the file is already been copied.
  FileOutputStream fos = ctx.openFileOutput(Helper.FILE_NAME, Context.MODE_PRIVATE);
  copyFile(fos, jsonFile); //my method to copy files.
  </code></pre>
  
  <p>The file might be updated in future releases of the app. if the System deletes internal files upon updating the app, the above code will be Ok. However, if this is not the case, then I need to implement another check <strong><em>to ensure the user has the latest version</em></strong>. Something like this:</p>
  
  <pre><code>if(file.exists() &amp;&amp; fileVersion == lastVersion) 
  </code></pre>