Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. File myPathFile
  2. FileReader fr = new FileReader(myPathFile);
  3. BufferedReader br = new BufferedReader(fr)
  4. String o = br.readLine();
  5. File f = new File(o)
  6.  
  7. File f = new File("\testömyFile.pdf"); //When the UNC looks like this it won't work. (the ö is �)
  8. File f2 = new File("\testmyFile.pdf"); //This works
  9.  
  10. \ComputerNameSharedFolderResource
  11.  
  12. [\] flag to suggest it's a UNC
  13. [ComputerName] The name of the remote computer
  14. [] separator character
  15. [SharedFolder] The shared folder name
  16. [Resource] The path name of the remote file
  17.  
  18. File f = new File("\\test\ö\myFile.pdf");
  19.  
  20. File f2 = new File("\\test\myFile.pdf");
  21.  
  22. File f = new File("c:\test\myFile.pdf");
  23.  
  24. File f = new File("\test\myFile.pdf");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement