public enum WindowsSpecialFolder extends java.lang.Enum<WindowsSpecialFolder>
The values represented by this enumeration are determined when first referenced
by calling PowerShell to obtain the path assigned to the special folder
identifier.
| Modifier and Type | Class and Description |
|---|---|
static class |
WindowsSpecialFolder.SpecialFolderException
Thrown when the folder assigned to a Windows Special Folder identifier cannot be determined.
|
| Enum Constant and Description |
|---|
COMMON_APPLICATION_DATA
Provides the
Path corresponding to the CommonApplicationData special folder. |
SYSTEM
Provides the
Path corresponding to the System special folder. |
| Modifier and Type | Method and Description |
|---|---|
java.nio.file.Path |
get()
Gets the
Path assigned to the identified special folder. |
static WindowsSpecialFolder |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static WindowsSpecialFolder[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final WindowsSpecialFolder COMMON_APPLICATION_DATA
Path corresponding to the CommonApplicationData special folder.
A get via this constant will attempt to create the folder if it does not already exist.public static final WindowsSpecialFolder SYSTEM
Path corresponding to the System special folder.public static WindowsSpecialFolder[] values()
for (WindowsSpecialFolder c : WindowsSpecialFolder.values()) System.out.println(c);
public static WindowsSpecialFolder valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic java.nio.file.Path get()
throws java.io.IOException
Path assigned to the identified special folder.Pathjava.io.IOException - if an error is raised while attempting to determine the
Path for the special folderCopyright © 2022. All rights reserved.