This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Files control Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Files control" Watch "Files control" New topic
Author

Files control

Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 289

Hi all

I'm using Windows OS and i want to save the files on Hard disk.
And i want to control that files should not delete manually.

Is it possible if not why?

Thanks


-Chiru
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9303
    
  17

Just see this page for how to use file save dialog. Also I don't think that you can control deletion of files manually from the OS...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 289


Thanks

If we set the Read only and Not executable attributes some how we can control i think.

And one more

How can i delete the File path tree
means file.delete() will work only if the Dir is empty that's why
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19697
    
  20

Recursively delete the tree:


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
GeeCON Prague 2014
 
subject: Files control