Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. // java-like pseudocode:
  2.  
  3. String myFile = ... // some path, relative or absolute, to a file in an accessible file system
  4.  
  5. URI = (new File(myFile)).getCanonicalFile().toURI();
  6.  
  7. String imageUri = File.toUri().toString().replaceFirst("^file:/", "");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement