Here you can find the source of createFile(Path path)
Parameter | Description |
---|---|
path | the path to the file to create. |
Parameter | Description |
---|---|
IOException | if something goes wrong. |
public static void createFile(Path path) throws IOException
//package com.java2s; import java.io.IOException; import java.nio.file.*; public class Main { /**//from w w w . j a v a 2s .c o m * Creates a new and empty file. * * @param path the path to the file to create. * @throws IOException if something goes wrong. */ public static void createFile(Path path) throws IOException { Files.createFile(path); } }