Spec-Zone .ru
спецификации, руководства, описания, API
|
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
PREV NEXT | FRAMES NO FRAMES |
Package | Description |
---|---|
java.io | Provides for system input and output through data streams, serialization and the file system. |
java.nio.channels | Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations. |
java.nio.file | Defines interfaces and classes for the Java virtual machine to access files, file attributes, and file systems. |
java.nio.file.spi | Service-provider classes for the java.nio.file package. |
Uses of Path in java.io |
---|
Modifier and Type | Method and Description |
---|---|
Path |
File.toPath()
Returns a java.nio.file.Path object constructed from the
this abstract path. |
Uses of Path in java.nio.channels |
---|
Modifier and Type | Method and Description |
---|---|
static AsynchronousFileChannel |
AsynchronousFileChannel.open(Path file,
OpenOption... options)
Opens or creates a file for reading and/or writing, returning an asynchronous file channel to access the file. |
static FileChannel |
FileChannel.open(Path file,
OpenOption... options)
Opens or creates a file, returning a file channel to access the file. |
static AsynchronousFileChannel |
AsynchronousFileChannel.open(Path file,
Set<? extends OpenOption> options,
ExecutorService executor,
FileAttribute<?>... attrs)
Opens or creates a file for reading and/or writing, returning an asynchronous file channel to access the file. |
static FileChannel |
FileChannel.open(Path file,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
Opens or creates a file, returning a file channel to access the file. |
Uses of Path in java.nio.file |
---|
Modifier and Type | Field and Description |
---|---|
static WatchEvent.Kind<Path> |
StandardWatchEventKind.ENTRY_CREATE
Directory entry created. |
static WatchEvent.Kind<Path> |
StandardWatchEventKind.ENTRY_DELETE
Directory entry deleted. |
static WatchEvent.Kind<Path> |
StandardWatchEventKind.ENTRY_MODIFY
Directory entry modified. |
Modifier and Type | Method and Description |
---|---|
abstract Path |
Path.copyTo(Path target,
CopyOption... options)
Copy the file located by this path to a target location. |
abstract Path |
Path.createDirectory(FileAttribute<?>... attrs)
Creates a new directory. |
abstract Path |
Path.createFile(FileAttribute<?>... attrs)
Creates a new and empty file, failing if the file already exists. |
abstract Path |
Path.createLink(Path existing)
Creates a new link (directory entry) for an existing file (optional operation). |
abstract Path |
Path.createSymbolicLink(Path target,
FileAttribute<?>... attrs)
Creates a symbolic link to a target (optional operation). |
static Path |
Paths.get(String path)
Constructs a Path by converting the given path string. |
static Path |
Paths.get(URI uri)
Converts the given URI to a Path object. |
abstract Path |
Path.getName()
Returns the name of the file or directory denoted by this path. |
abstract Path |
Path.getName(int index)
Returns a name element of this path. |
abstract Path |
Path.getParent()
Returns the parent path, or null if this path does not
have a parent. |
abstract Path |
FileSystem.getPath(String path)
Converts a path string to a Path . |
abstract Path |
Path.getRoot()
Returns the root component of this path as a Path object,
or null if this path does not have a root component. |
abstract Path |
Path.moveTo(Path target,
CopyOption... options)
Move or rename the file located by this path to a target location. |
abstract Path |
Path.normalize()
Returns a path that is this path with redundant name elements eliminated. |
abstract Path |
Path.readSymbolicLink()
Reads the target of a symbolic link (optional operation). |
abstract Path |
Path.relativize(Path other)
Constructs a relative path between this path and a given path. |
abstract Path |
Path.resolve(Path other)
Resolve the given path against this path. |
abstract Path |
Path.resolve(String other)
Converts a given path string to a Path and resolves it against
this Path in exactly the manner specified by the resolve method. |
abstract Path |
Path.subpath(int beginIndex,
int endIndex)
Returns a relative Path that is a subsequence of the name
elements of this path. |
abstract Path |
Path.toAbsolutePath()
Returns a Path object representing the absolute path of this
path. |
abstract Path |
Path.toRealPath(boolean resolveLinks)
Returns the real path of an existing file. |
Modifier and Type | Method and Description |
---|---|
abstract Iterable<Path> |
FileSystem.getRootDirectories()
Returns an object to iterate over the paths of the root directories. |
abstract Iterator<Path> |
Path.iterator()
Returns an iterator over the name elements of this path. |
abstract DirectoryStream<Path> |
Path.newDirectoryStream()
Opens the directory referenced by this object, returning a DirectoryStream to iterate over all entries in the directory. |
abstract DirectoryStream<Path> |
Path.newDirectoryStream(DirectoryStream.Filter<? super Path> filter)
Opens the directory referenced by this object, returning a DirectoryStream to iterate over the entries in the directory. |
abstract DirectoryStream<Path> |
Path.newDirectoryStream(String glob)
Opens the directory referenced by this object, returning a DirectoryStream to iterate over the entries in the directory. |
Modifier and Type | Method and Description |
---|---|
abstract int |
Path.compareTo(Path other)
Compares two abstract paths lexicographically. |
abstract Path |
Path.copyTo(Path target,
CopyOption... options)
Copy the file located by this path to a target location. |
static void |
Files.createDirectories(Path dir,
FileAttribute<?>... attrs)
Creates a directory by creating all nonexistent parent directories first. |
abstract Path |
Path.createLink(Path existing)
Creates a new link (directory entry) for an existing file (optional operation). |
abstract Path |
Path.createSymbolicLink(Path target,
FileAttribute<?>... attrs)
Creates a symbolic link to a target (optional operation). |
abstract boolean |
Path.endsWith(Path other)
Tests if this path ends with the given path. |
abstract boolean |
Path.isSameFile(Path other)
Tests if the file referenced by this object is the same file referenced by another object. |
boolean |
PathMatcher.matches(Path path)
Tells if given path matches this matcher's pattern. |
abstract Path |
Path.moveTo(Path target,
CopyOption... options)
Move or rename the file located by this path to a target location. |
abstract Path |
Path.relativize(Path other)
Constructs a relative path between this path and a given path. |
abstract Path |
Path.resolve(Path other)
Resolve the given path against this path. |
abstract boolean |
Path.startsWith(Path other)
Tests if this path starts with the given path. |
static void |
Files.walkFileTree(Path start,
FileVisitor<? super Path> visitor)
Walks a file tree. |
static void |
Files.walkFileTree(Path start,
Set<FileVisitOption> options,
int maxDepth,
FileVisitor<? super Path> visitor)
Walks a file tree. |
Modifier and Type | Method and Description |
---|---|
abstract DirectoryStream<Path> |
Path.newDirectoryStream(DirectoryStream.Filter<? super Path> filter)
Opens the directory referenced by this object, returning a DirectoryStream to iterate over the entries in the directory. |
static void |
Files.walkFileTree(Path start,
FileVisitor<? super Path> visitor)
Walks a file tree. |
static void |
Files.walkFileTree(Path start,
Set<FileVisitOption> options,
int maxDepth,
FileVisitor<? super Path> visitor)
Walks a file tree. |
Uses of Path in java.nio.file.spi |
---|
Modifier and Type | Method and Description |
---|---|
abstract Path |
FileSystemProvider.getPath(URI uri)
Return a Path object by converting the given URI . |
Modifier and Type | Method and Description |
---|---|
AsynchronousFileChannel |
FileSystemProvider.newAsynchronousFileChannel(Path path,
Set<? extends OpenOption> options,
ExecutorService executor,
FileAttribute<?>... attrs)
Opens or creates a file for reading and/or writing, returning an asynchronous file channel to access the file. |
FileChannel |
FileSystemProvider.newFileChannel(Path path,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
Opens or creates a file for reading and/or writing, returning a file channel to access the file. |
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
PREV NEXT | FRAMES NO FRAMES |
Copyright © 1993, 2010, Oracle Corporation. All rights reserved.