aspose file tools*
The moose likes Beginning Java and the fly likes Difference between a FileAttribute and a FileAttributeView. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Difference between a FileAttribute and a FileAttributeView." Watch "Difference between a FileAttribute and a FileAttributeView." New topic
Author

Difference between a FileAttribute and a FileAttributeView.

Nick Widelec
Ranch Hand

Joined: Feb 28, 2013
Posts: 226

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.


OCAJP 7, OCPJP 7
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7063
    
  16

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

Isn't it funny how there's always time and money enough to do it WRONG?
Artlicles by Winston can be found here
 
wood burning stoves
 
subject: Difference between a FileAttribute and a FileAttributeView.
 
Similar Threads
Upload Image File Tomcat - File Path Not read in UNIX
HTML links not linking properly
Image formats allowed
Writing an audio file in internal memory
HFSJ final mock exam quetion 54 - taglib and uri