Package | Description |
---|---|
java.nio.file |
Defines interfaces and classes for the Java virtual machine to access files,
file attributes, and file systems.
|
java.nio.file.attribute |
Interfaces and classes providing access to file and file system attributes.
|
java.util.zip |
Provides classes for reading and writing the standard ZIP and GZIP file
formats.
|
Modifier and Type | Method | Description |
---|---|---|
static FileTime |
Files.getLastModifiedTime(Path path,
LinkOption... options) |
Returns a file's last modified time.
|
Modifier and Type | Method | Description |
---|---|---|
static Path |
Files.setLastModifiedTime(Path path,
FileTime time) |
Updates a file's last modified time attribute.
|
Modifier and Type | Method | Description |
---|---|---|
FileTime |
BasicFileAttributes.creationTime() |
Returns the creation time.
|
static FileTime |
FileTime.from(long value,
TimeUnit unit) |
Returns a
FileTime representing a value at the given unit of
granularity. |
static FileTime |
FileTime.from(Instant instant) |
Returns a
FileTime representing the same point of time value
on the time-line as the provided Instant object. |
static FileTime |
FileTime.fromMillis(long value) |
Returns a
FileTime representing the given value in milliseconds. |
FileTime |
BasicFileAttributes.lastAccessTime() |
Returns the time of last access.
|
FileTime |
BasicFileAttributes.lastModifiedTime() |
Returns the time of last modification.
|
Modifier and Type | Method | Description |
---|---|---|
int |
FileTime.compareTo(FileTime other) |
Compares the value of two
FileTime objects for order. |
void |
BasicFileAttributeView.setTimes(FileTime lastModifiedTime,
FileTime lastAccessTime,
FileTime createTime) |
Updates any or all of the file's last modified time, last access time,
and create time attributes.
|
Modifier and Type | Method | Description |
---|---|---|
FileTime |
ZipEntry.getCreationTime() |
Returns the creation time of the entry.
|
FileTime |
ZipEntry.getLastAccessTime() |
Returns the last access time of the entry.
|
FileTime |
ZipEntry.getLastModifiedTime() |
Returns the last modification time of the entry.
|
Modifier and Type | Method | Description |
---|---|---|
ZipEntry |
ZipEntry.setCreationTime(FileTime time) |
Sets the creation time of the entry.
|
ZipEntry |
ZipEntry.setLastAccessTime(FileTime time) |
Sets the last access time of the entry.
|
ZipEntry |
ZipEntry.setLastModifiedTime(FileTime time) |
Sets the last modification time of the entry.
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.mlchung.jdk9-jdeps