public enum FileSystem extends Enum<FileSystem>
Modifier and Type | Class and Description |
---|---|
protected static interface |
FileSystem.Dispatcher
A dispatcher to resolve a
File to a java.nio.file.Path . |
protected static interface |
FileSystem.Files
A dispatcher to interact with
java.nio.file.Files . |
protected static interface |
FileSystem.StandardCopyOption
A dispatcher to interact with
java.nio.file.StandardCopyOption . |
Enum Constant and Description |
---|
INSTANCE
The singleton instance.
|
Modifier and Type | Method and Description |
---|---|
void |
copy(File source,
File target)
Copies a file.
|
void |
move(File source,
File target)
Moves a file.
|
static FileSystem |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FileSystem[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FileSystem INSTANCE
public static FileSystem[] values()
for (FileSystem c : FileSystem.values()) System.out.println(c);
public static FileSystem valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic void copy(File source, File target) throws IOException
source
- The source file.target
- The target file.IOException
- If an I/O exception occurs.public void move(File source, File target) throws IOException
source
- The source file.target
- The target file.IOException
- If an I/O exception occurs.Copyright © 2014–2021. All rights reserved.