public class FileUtils extends Object
| Constructor and Description |
|---|
FileUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
exists(String path)
Checks if file exists.
|
static File |
fileFromPathOrCreate(String path)
Opens file if exists, or creates it if not exist yet.
|
static File |
fileFromPathOrThrow(String path)
Opens file if exists, throws exception otherwise.
|
public static boolean exists(String path)
path - path to filepublic static File fileFromPathOrThrow(String path)
path - path to fileIllegalArgumentException - if the file does not existpublic static File fileFromPathOrCreate(String path) throws IOException
path - path to fileIOException - if the file does not exist and could not be createdCopyright © 2025 FG Forrest, a.s.. All rights reserved.