This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes A question about Files.createFile(); Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "A question about Files.createFile();" Watch "A question about Files.createFile();" New topic
Author

A question about Files.createFile();

Nick Widelec
Ranch Hand

Joined: Feb 28, 2013
Posts: 226

Basically in the `Files.createFile(Path fileName, FileAttribute<?>... attrs );` there is the possibility to insert a series of attributes. I am aware of the following possibility:






Do you know any other real life application of the `createFile()` method? And with other application I mean other attributes passed as a FileAttribute parameter other than a set of PosixFilePermission? What are other "passable" FileAttribute parameter that I can use to create a new file with `File.createFile(path, attr);` ?
Thanks in advance.

OCAJP 7, OCPJP 7
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3602
    
  14

Good question. The documentation is lacking, and the interface doesn't seem to have anything to do with any of the attributes that you can read or write to a file with many of the other methods in the standard API.

Maybe it's used to future-proof the method, and there are not many uses for it now?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A question about Files.createFile();
 
Similar Threads
Files not found in image directory
creating directories...HELP
Client Issue
Java 1.7 nio question(s)
My app works on one phone but not another