Package | Description |
---|---|
java.nio.file |
Defines interfaces and classes for the Java virtual machine to access files,
file attributes, and file systems.
|
Modifier and Type | Method and Description |
---|---|
static LinkOption |
LinkOption.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LinkOption[] |
LinkOption.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
Files.exists(Path path,
LinkOption... options)
Tests whether a file exists.
|
static Object |
Files.getAttribute(Path path,
String attribute,
LinkOption... options)
Reads the value of a file attribute.
|
static FileTime |
Files.getLastModifiedTime(Path path,
LinkOption... options)
Returns a file's last modified time.
|
static boolean |
Files.isDirectory(Path path,
LinkOption... options)
Tests whether a file is a directory.
|
static boolean |
Files.isRegularFile(Path path,
LinkOption... options)
Tests whether a file is a regular file with opaque content.
|
static boolean |
Files.notExists(Path path,
LinkOption... options)
Tests whether the file located by this path does not exist.
|
static <A extends BasicFileAttributes> |
Files.readAttributes(Path path,
Class<A> type,
LinkOption... options)
Reads a file's attributes as a bulk operation.
|
static Path |
Files.setAttribute(Path path,
String attribute,
Object value,
LinkOption... options)
Sets the value of a file attribute.
|
Path |
Path.toRealPath(LinkOption... options)
Returns the real path of an existing file.
|
Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. Use of this specification is subject to license terms.