wood burning stoves 2.0*
The moose likes I/O and Streams and the fly likes Attributes on files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Attributes on files" Watch "Attributes on files" New topic
Author

Attributes on files

Stefan Hedberg
Greenhorn

Joined: Feb 13, 2004
Posts: 1
Hi.
Just wondering how to get the attributes from files that we read?
Some say that java cannot read this and some say you can but they don't know how. Please help me.
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
What attributes are you looking for? The File object can tell you if it's readble or not, the size, modifed time, etc. I dno't believe it can tell you what permission is on the file etc.
Stefan G Hedberg
Greenhorn

Joined: Feb 17, 2004
Posts: 1
well it was the permissions I wanted to get. Working on a backup that will work on all systems and that will be able to restore files as they were before the backup. To do that I need to know the permissions on the files so that information can be stored with the file in the db.
 
wood burning stoves
 
subject: Attributes on files
 
Similar Threads
Request attributes are thread safe
Maps
How to DIFFERENTIATE the HYPERLINKS !!
RE-POST: How to read the details of already parsed struts-config
Doubts in Dynamic Attributes