File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between a FileAttribute and a FileAttributeView.

 
Nick Widelec
Ranch Hand
Posts: 226
Eclipse IDE Firefox Browser Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically I have these snippet:


Why would I use pfav at all? if most of the time using pfav implies calling .readAttributes() which in turn returns a PosixFileAttributes object.

Bottom line: I would like to know what is the use of a View, why should I use it, in which circumstances it is useful instead of directly using a "TypeFileAttributes".

Thanks in advance.
 
Winston Gutkowski
Bartender
Pie
Posts: 9472
50
Eclipse IDE Hibernate Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nick Widelec wrote:Bottom line: I would like to know what is the use of a View, why should I use it, in which circumstances it is useful instead of directly using a "TypeFileAttributes".

Well, from what I can see - although I've never used the classes - it's mandated by the docs.

As to why: You'd probably have to ask the designers. Or possibly there's a Java 7 tutorial around that explains the reasons.

As to TypeFileAttributes: I have no idea - I wasn't able to find any reference to such an animal via a quick Google search.

I wonder if this thread might be better suited to our Java 7 forum. If so, let me know and I'll move it.

Winston
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic