public final class CommonFiles extends Object
| Constructor and Description |
|---|
CommonFiles() |
| Modifier and Type | Method and Description |
|---|---|
static Path |
createCommonAppFile(Path path)
Creates a file, using the relative path provided, in the system-appropriate directory
for persistent, cross-process, cross-user data.
|
public static Path createCommonAppFile(Path path) throws IOException
On Windows machines, the Windows directory assigned to the CommonApplicationData
special folder is used. On *NIX machines, /var/tmp (not java.io.tmpdir)
is used.
path - the relative path to the file to create within the common directoryFileNotFoundException - if the system-appropriate directory does not existIOException - if an error is raised while attempting to create the fileIllegalArgumentException - if path is not relative or is emptyCopyright © 2022. All rights reserved.