Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Create blank xml file on program startup  RSS feed

 
Alice Hampton
Ranch Hand
Posts: 217
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When my app starts up is it possible to create a blank xml file in the c drive? so I can use it later on down the line
 
Joanne Neal
Rancher
Posts: 3742
16
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alice Hampton wrote:When my app starts up is it possible to create a blank xml file in the c drive? so I can use it later on down the line

Yes. The File class has methods for creating empty files. The newer file/directory related classes may have alternatives.
 
Alice Hampton
Ranch Hand
Posts: 217
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you that's what I did - I was thinking about it in a much more complex way at the time rather than simply doing it like that and using a try catch - got it working now thank you for your comment!
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!