| Modifier and Type | Class and Description |
|---|---|
| private class | UnixSecureDirectoryStream.
A BasicFileAttributeView implementation that using a dfd/name pair. |
| private class | UnixSecureDirectoryStream.
A PosixFileAttributeView implementation that using a dfd/name pair. |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final UnixDirectoryStream |
| Access | Constructor and Description |
|---|---|
| pack-priv | UnixSecureDirectoryStream(UnixPath dir, long dp, int dfd, DirectoryStream.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| public void | deleteDirectory(Path dir)
Implements java. Deletes a directory. |
| public void | |
| public <V extends FileAttributeView> V | getFileAttributeView(Class<V> type)
Implements java. Returns file attribute view bound to this directory |
| public <V extends FileAttributeView> V | getFileAttributeView(Path obj, Class<V> type, LinkOption... options)
Implements java. Returns file attribute view bound to dfd/filename. |
| private <V extends FileAttributeView> V | |
| private UnixPath | |
| private void | |
| public Iterator | iterator()
Implements java. Returns the iterator associated with this |
| public void | move(Path fromObj, SecureDirectoryStream<Path> dir, Path toObj)
Implements java. Rename/move file in this directory to another (open) directory |
| public SeekableByteChannel | newByteChannel(Path obj, Set<? extends OpenOption> options, FileAttribute<?>... attrs)
Implements java. Opens file in this directory |
| public SecureDirectoryStream | newDirectoryStream(Path obj, LinkOption... options)
Implements java. Opens sub-directory in this directory |
| dfd | back to summary |
|---|---|
| private final int dfd | |
| ds | back to summary |
|---|---|
| private final UnixDirectoryStream ds | |
| UnixSecureDirectoryStream | back to summary |
|---|---|
| pack-priv UnixSecureDirectoryStream(UnixPath dir, long dp, int dfd, DirectoryStream. | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| deleteDirectory | back to summary |
|---|---|
| public void deleteDirectory(Path dir) throws IOException Implements java. Doc from java. Deletes a directory. Unlike the
| |
| deleteFile | back to summary |
|---|---|
| public void deleteFile(Path file) throws IOException Implements java. Doc from java. Deletes a file. Unlike the
| |
| getFileAttributeView | back to summary |
|---|---|
| public <V extends FileAttributeView> V getFileAttributeView(Class<V> type) Implements java. Returns file attribute view bound to this directory
| |
| getFileAttributeView | back to summary |
|---|---|
| public <V extends FileAttributeView> V getFileAttributeView(Path obj, Class<V> type, LinkOption... options) Implements java. Returns file attribute view bound to dfd/filename.
| |
| getFileAttributeViewImpl | back to summary |
|---|---|
private <V extends FileAttributeView> V getFileAttributeViewImpl(UnixPath file, Class<V> type, boolean followLinks)
| |
| getName | back to summary |
|---|---|
| private UnixPath getName(Path obj) | |
| implDelete | back to summary |
|---|---|
| private void implDelete(Path obj, int flags) throws IOException Deletes file/directory in this directory. Works in a race-free manner when invoked with flags. | |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Doc from java. Returns the iterator associated with this
| |
| move | back to summary |
|---|---|
| public void move(Path fromObj, SecureDirectoryStream<Path> dir, Path toObj) throws IOException Implements java. Rename/move file in this directory to another (open) directory
| |
| newByteChannel | back to summary |
|---|---|
| public SeekableByteChannel newByteChannel(Path obj, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException Implements java. Opens file in this directory
| |
| newDirectoryStream | back to summary |
|---|---|
| public SecureDirectoryStream Implements java. Opens sub-directory in this directory
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final UnixPath | |
| pack-priv final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public String | name()
Implements java. Returns the name of the attribute view. |
| pack-priv int | |
| public BasicFileAttributes | readAttributes()
Implements java. Reads the basic file attributes as a bulk operation. |
| public void | setTimes(FileTime lastModifiedTime, FileTime lastAccessTime, FileTime createTime)
Implements java. Updates any or all of the file's last modified time, last access time, and create time attributes. |
| file | back to summary |
|---|---|
| pack-priv final UnixPath file | |
| followLinks | back to summary |
|---|---|
| pack-priv final boolean followLinks | |
| BasicFileAttributeViewImpl | back to summary |
|---|---|
| pack-priv BasicFileAttributeViewImpl(UnixPath file, boolean followLinks) | |
| name | back to summary |
|---|---|
| public String name() Implements java. Doc from java. Returns the name of the attribute view. Attribute views of this type
have the name
| |
| open | back to summary |
|---|---|
| pack-priv int open() throws IOException | |
| readAttributes | back to summary |
|---|---|
| public BasicFileAttributes readAttributes() throws IOException Implements java. Doc from java. Reads the basic file attributes as a bulk operation. It is implementation specific if all file attributes are read as an atomic operation with respect to other file system operations.
| |
| setTimes | back to summary |
|---|---|
| public void setTimes(FileTime lastModifiedTime, FileTime lastAccessTime, FileTime createTime) throws IOException Implements java. Doc from java. Updates any or all of the file's last modified time, last access time, and create time attributes. This method updates the file's timestamp attributes. The values are
converted to the epoch and precision supported by the file system.
Converting from finer to coarser granularities results in precision loss.
The behavior of this method when attempting to set a timestamp that is
not supported or to a value that is outside the range supported by the
underlying file store is not defined. It may or not fail by throwing an
If any of the Usage Example: Suppose we want to change a file's last access time. Path path = ... FileTime time = ... Files.getFileAttributeView(path, BasicFileAttributeView.class).setTimes(null, time, null);
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| PosixFileAttributeViewImpl | back to summary |
|---|---|
| pack-priv PosixFileAttributeViewImpl(UnixPath file, boolean followLinks) | |
| getOwner | back to summary |
|---|---|
| public UserPrincipal getOwner() throws IOException Implements java. Doc from java. Read the file owner. It is implementation specific if the file owner can be a
| |
| name | back to summary |
|---|---|
| public String name() Overrides sun. Implements java. Doc from java. Returns the name of the attribute view. Attribute views of this type
have the name
| |
| readAttributes | back to summary |
|---|---|
| public PosixFileAttributes readAttributes() throws IOException Overrides sun. Implements java. Doc from java. Reads the basic file attributes as a bulk operation. It is implementation specific if all file attributes are read as an atomic operation with respect to other file system operations.
| |
| setGroup | back to summary |
|---|---|
| public void setGroup(GroupPrincipal group) throws IOException Implements java. Doc from java. Updates the file group-owner.
| |
| setOwner | back to summary |
|---|---|
| public void setOwner(UserPrincipal owner) throws IOException Implements java. Doc from java. Updates the file owner. It is implementation specific if the file owner can be a
| |
| setOwners | back to summary |
|---|---|
| private void setOwners(int uid, int gid) throws IOException | |
| setPermissions | back to summary |
|---|---|
| public void setPermissions(Set<PosixFilePermission> perms) throws IOException Implements java. Doc from java. Updates the file permissions.
| |