public final class Files extends java.lang.Object
|Modifier and Type||Method and Description|
public static java.io.File findNextFile(java.io.File directory, java.lang.String filenameFormat)
Filethat denotes a file that does not currently exist.
The filename of the file is based on
filenameFormat and a number that is calculated by this method. For this algorithm to work,
filenameFormat needs to have exactly one occurrence of
"%s" in it.
An example of
filenameFormat could be
"Dayflower-Image-%s.png". This could result in a filename of
"Dayflower-Image-1.png". If a file with that filename already exists, the next would be
NullPointerException will be thrown.
directory- the directory of the files
filenameFormat- the filename format to use
Filethat denotes a file that does not currently exist