A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Refactoring for Software Design Smells: Managing Technical Debt
this week in the
OO, Patterns, UML and Refactoring
Need Help In java.io.File
Joined: Jul 08, 2001
Jul 09, 2002 04:08:00
I am using
. I have set the file readonly from method setReadOnly() now i want to remove readonly attribute. is there any methos available to do so? and also tell me how to make a file hidden.
Waiting gor reply
Joined: Oct 12, 2001
Jul 09, 2002 06:59:00
You can not do it in
, BUT you can do it like this:
Runtime.getRuntime().exec("cmd /c attrib +H test.txt");
Where '-H' is remove hidden attribute and '+H' is set hidden attribute.
[ July 09, 2002: Message edited by: Rene Larsen ]
Regards, Rene Larsen
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Need Help In java.io.File
Program to check whehter a file is read-only / write
How to Convert a java.io.File to struts FormFile?
non-editable in textarea
Access Denied Error...
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015