This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File creation

 
srikrish
Ranch Hand
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a doubt on file creation.
When you say File f=new File("myfile.ext"), you are only creating a reference to a file object. This does not create the actual file itself. Right? So, is there any method whereby we can create a file on the machine? I know the delete() method of File class deletes the actual file itself. Is there a similar method for the creation of the actual file itself?
 
Sandeep Potnis
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
srikrish,
There is a createNewFile() method in the File class.
Take a look at JDK 1.2.2 API.
Sandeep
 
srikrish
Ranch Hand
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sandeep.I need to work on this File class.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic