Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

why can't we delete a file through java program  RSS feed

 
Gaurav Chikara
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If we can create a file through FileOutputStream or RandomAccessFile dynamically through a java program then why we cannot delete the file created in such a way dynamically
My application requires me to do so but I have not been able to find a crack on it
 
Matt Siegel
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can, use File.delete()
You probably have to close the file first.
Matt
[This message has been edited by Matt Siegel (edited March 15, 2001).]
 
Gaurav Chikara
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh Thankx
I forgot to look into File API and posted the question
Now my problem is solved

Originally posted by Matt Siegel:
You can, use File.delete()
You probably have to close the file first.
Matt
[This message has been edited by Matt Siegel (edited March 15, 2001).]

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!