• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

DosFileAttribute named "attributes"

Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks

When I return a map from the Files.readAttributes(Path, String, LinkOption...) method
as well as the expected 9 BasicFileAttributes and 4 DosFileAttributes
it contains an extra attribute named attributes associated with an Integer value (32)


lastModifiedTime : 2015-09-26T23:35:04.715864Z
lastAccessTime : 2015-09-26T23:23:23.587762Z
isSymbolicLink : false
size : 475
system : false
fileKey : null
isDirectory : false
hidden : false
isOther : false
isRegularFile : true
creationTime : 2015-09-26T23:23:23.587762Z
attributes : 32
archive : true
readonly : false

I found it to be available for reading by: But writing threw an exceptionException in thread "main" java.lang.IllegalArgumentException: 'dos:attributes' not recognized

What is this attribute "attributes"?
Ranch Hand
Posts: 417
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Attributes are usually bits which makes the values go like 1,2,4,8,16,32,64,128

So, I would guess attributes is just the sum of all attributes that have their bit set (archive) but this is just a guess...
What are your superhero powers? Go ahead and try them on this tiny ad:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic