From this Oracle Java Tutorial:
The asFileAttribute method accepts a set of file permissions and creates a file attribute that can be passed to Path.createFile or Path.createDirectory.
Did they mean Files.createFile ?
Files.createFile
The documentation was correct but not updated.
In JDK7 build b129, the abstract Path.createFile method was present in the abstract Path class. In JDK 7 build b130, the abstract Path class becomes interface and the method has been moved to the "File Class" .
Here is a link to changeet in the OpenJDK 7 Mercury Repository .
-public abstract class Path - implements FileRef, Comparable<Path>, Iterable<Path>, Watchable +public interface Path + extends Comparable<Path>, Iterable<Path>, Watchable
and a link to a related bug in the JDK error system.
Source: https://habr.com/ru/post/1495900/More articles:Python syntax highlighting Vim doxter type in python - pythonwhy it is impossible to add Int and floating point number in haskell - haskellHow to rewrite a URL without leaving the current page in C #? - c #How to make a serial number? with the "-" section in the middle - javaC # Regular expression pattern for which it matches - c #Identify and replace duplicate elements from vector - rMaximum request length exceeded despite specified configuration values - web-configMake asp: TextBox inside the repeater, run Repeater ItemCommand when Enter pressed - c #https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1495904/android-how-to-grant-666-privs-to-a-device-via-ueventdrc&usg=ALkJrhhHdxsvnr3D_B9DDAG9zbfT8nO1BAConnect to PostgreSql database on Linux VirtualBox from Win7 - linuxAll Articles