Thread: Files
View Single Post
Old 12-20-2004, 05:55 AM   #3 (permalink)
freesoft_2000
Code Monkey
 
Join Date: Oct 2004
Posts: 51
freesoft_2000 is on a distinguished road
Hi everyone,

Belisarius can i do this to create a platform independent file

Code:
   
     String str1 = "C:\\abc\\efg.exe"
     File file1 = new File(str1);
     String str2 = file1.getCanonicalPath();
     //Now i will the instance of str2 for any file streams

OR THIS


Code:
    String str1 = "C:\\abc\\efg.exe"
     File file1 = new File(str1);
     String str2 = file1.getAbsolutePath();
     //Now i will the instance of str2 for any file streams
Will what i do create a platform independent file?

By the way

Merry Christmas and a Happy New Year to everyone

Thank You

Yours Sincerely

Richard West
freesoft_2000 is offline   Reply With Quote