Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Archive bit

 
Grant Crofton
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possibe to read / set the 'archive' attribute of a file? The File class lets you do all the other attributes. Or is this only a Windows thing, and therefore not supported - and if this is the case, is there any way round it?
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From Java IO by O'Reilly:
Java allows you to test a fairly broad section of possible file attributes but, doen't allow easy access to platform specific attributes like Mac file types and creator codes, Windows archive attribute and Unix group IDs.
If you wish to chane the attribute, you could Runtime.exec() the attrib command. However, I don't know of an easy way to read this attribute from java.
 
Grant Crofton
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, thanks.
 
I like tacos! And this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!