This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

pathname  RSS feed

 
Doit
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are pathname, fliename platform independent?
- Thanks.
 
Stephanie Grasson
Ranch Hand
Posts: 347
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that pathname / filename are platform DEPENDENT.
RHE gives the following example on page 378:
on a Unix machine:
File f = new File("/tmp", "xyz"); // assume /tmp is a directory
on a Windows machine:
File f1 = new File("C:\\a"); // assume C:\\a is a directory
File f2 = new File(f1, "Xyz.java");
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!