This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

A question about Files.createFile();  RSS feed

 
Nick Widelec
Ranch Hand
Posts: 226
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Stephan van Hulst
Saloon Keeper
Posts: 7804
142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!