title: How to check if two paths is on the same mount point?
body: <p>I need to move a file from one directory to another in the android filesystem. How can I programmatically check if the two paths is on the same mountpoint?</p>
  
  <p>The reason I want to know this is because if they are, we need to copy the bits instead of using <a href="http://developer.android.com/reference/java/io/File.html#renameTo(java.io.File)" rel="noreferrer">File.rename(newPath)</a>.</p>
  
  <p>Examples when the paths is on different mountpoints:</p>
  
  <ul>
  <li><p>The user wants to move a file from the internal to external storage.</p></li>
  <li><p>The user wants to move a file from /sdcard/files to /sdcard/external_sd/files on a samsungdevice.</p></li>
  </ul>