APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.nio.fs

pack-priv Class UnixFileAttributes

extends Object
implements PosixFileAttributes
Class Inheritance
All Implemented Interfaces
java.nio.file.attribute.PosixFileAttributes, java.nio.file.attribute.BasicFileAttributes
Imports
java.nio.file.attribute.BasicFileAttributes, .FileTime, .GroupPrincipal, .PosixFileAttributes, .PosixFilePermission, .UserPrincipal, java.util.EnumSet, .Set, java.util.concurrent.TimeUnit

Unix implementation of PosixFileAttributes.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private boolean
private volatile GroupPrincipal
private volatile UnixFileKey
private volatile UserPrincipal
private long
private long
private long
private long
private long
private long
private long
private int
private long
private int
private long
private long
private int
private long
private long
private int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv BasicFileAttributes
public FileTime
pack-priv FileTime
pack-priv long
dev()

public UnixFileKey
fileKey()

Implements java.nio.file.attribute.BasicFileAttributes.fileKey.

Returns an object that uniquely identifies the given file, or null if a file key is not available.

pack-priv static UnixFileAttributes
get(UnixPath path, boolean followLinks)

pack-priv static UnixFileAttributes
get(int fd)

pack-priv static UnixFileAttributes
get(int dfd, UnixPath path, boolean followLinks)

pack-priv static UnixFileAttributes
pack-priv static UnixFileAttributes
getIfExists(UnixPath path, boolean followLinks)

pack-priv int
gid()

public GroupPrincipal
group()

Implements java.nio.file.attribute.PosixFileAttributes.group.

Returns the group owner of the file.

pack-priv long
ino()

pack-priv boolean
public boolean
isDirectory()

Implements java.nio.file.attribute.BasicFileAttributes.isDirectory.

Tells whether the file is a directory.

public boolean
isOther()

Implements java.nio.file.attribute.BasicFileAttributes.isOther.

Tells whether the file is something other than a regular file, directory, or symbolic link.

public boolean
isRegularFile()

Implements java.nio.file.attribute.BasicFileAttributes.isRegularFile.

Tells whether the file is a regular file with opaque content.

pack-priv boolean
public FileTime
lastAccessTime()

Implements java.nio.file.attribute.BasicFileAttributes.lastAccessTime.

Returns the time of last access.

public FileTime
lastModifiedTime()

Implements java.nio.file.attribute.BasicFileAttributes.lastModifiedTime.

Returns the time of last modification.

pack-priv int
mode()

public UserPrincipal
owner()

Implements java.nio.file.attribute.PosixFileAttributes.owner.

Returns the owner of the file.

public Set<PosixFilePermission>
permissions()

Implements java.nio.file.attribute.PosixFileAttributes.permissions.

Returns the permissions of the file.

pack-priv long
rdev()

public long
size()

Implements java.nio.file.attribute.BasicFileAttributes.size.

Returns the size of the file (in bytes).

private static FileTime
toFileTime(long sec, long nsec)

pack-priv int
uid()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

birthtime_availableback to summary
private boolean birthtime_available
groupback to summary
private volatile GroupPrincipal group
keyback to summary
private volatile UnixFileKey key
ownerback to summary
private volatile UserPrincipal owner
st_atime_nsecback to summary
private long st_atime_nsec
st_atime_secback to summary
private long st_atime_sec
st_birthtime_nsecback to summary
private long st_birthtime_nsec
st_birthtime_secback to summary
private long st_birthtime_sec
st_ctime_nsecback to summary
private long st_ctime_nsec
st_ctime_secback to summary
private long st_ctime_sec
st_devback to summary
private long st_dev
st_gidback to summary
private int st_gid
st_inoback to summary
private long st_ino
st_modeback to summary
private int st_mode
st_mtime_nsecback to summary
private long st_mtime_nsec
st_mtime_secback to summary
private long st_mtime_sec
st_rdevback to summary
private long st_rdev
st_sizeback to summary
private long st_size
st_uidback to summary
private int st_uid

Constructor Detail

UnixFileAttributesback to summary
private UnixFileAttributes()

Method Detail

asBasicFileAttributesback to summary
pack-priv BasicFileAttributes asBasicFileAttributes()
creationTimeback to summary
public FileTime creationTime()

Implements java.nio.file.attribute.BasicFileAttributes.creationTime.

Doc from java.nio.file.attribute.BasicFileAttributes.creationTime.

Returns the creation time. The creation time is the time that the file was created.

If the file system implementation does not support a time stamp to indicate the time when the file was created then this method returns an implementation specific default value, typically the last-modified-time or a FileTime representing the epoch (1970-01-01T00:00:00Z).

Annotations
@Override
ctimeback to summary
pack-priv FileTime ctime()
devback to summary
pack-priv long dev()
fileKeyback to summary
public UnixFileKey fileKey()

Implements java.nio.file.attribute.BasicFileAttributes.fileKey.

Doc from java.nio.file.attribute.BasicFileAttributes.fileKey.

Returns an object that uniquely identifies the given file, or null if a file key is not available. On some platforms or file systems it is possible to use an identifier, or a combination of identifiers to uniquely identify a file. Such identifiers are important for operations such as file tree traversal in file systems that support symbolic links or file systems that allow a file to be an entry in more than one directory. On UNIX file systems, for example, the device ID and inode are commonly used for such purposes.

The file key returned by this method can only be guaranteed to be unique if the file system and files remain static. Whether a file system re-uses identifiers after a file is deleted is implementation dependent and therefore unspecified.

File keys returned by this method can be compared for equality and are suitable for use in collections. If the file system and files remain static, and two files are the same with non-null file keys, then their file keys are equal.

Annotations
@Override
getback to summary
pack-priv static UnixFileAttributes get(UnixPath path, boolean followLinks) throws UnixException
getback to summary
pack-priv static UnixFileAttributes get(int fd) throws UnixException
getback to summary
pack-priv static UnixFileAttributes get(int dfd, UnixPath path, boolean followLinks) throws UnixException
getIfExistsback to summary
pack-priv static UnixFileAttributes getIfExists(UnixPath path) throws UnixException
getIfExistsback to summary
pack-priv static UnixFileAttributes getIfExists(UnixPath path, boolean followLinks) throws UnixException
gidback to summary
pack-priv int gid()
groupback to summary
public GroupPrincipal group()

Implements java.nio.file.attribute.PosixFileAttributes.group.

Doc from java.nio.file.attribute.PosixFileAttributes.group.

Returns the group owner of the file.

Annotations
@Override
inoback to summary
pack-priv long ino()
isDeviceback to summary
pack-priv boolean isDevice()
isDirectoryback to summary
public boolean isDirectory()

Implements java.nio.file.attribute.BasicFileAttributes.isDirectory.

Doc from java.nio.file.attribute.BasicFileAttributes.isDirectory.

Tells whether the file is a directory.

Annotations
@Override
isOtherback to summary
public boolean isOther()

Implements java.nio.file.attribute.BasicFileAttributes.isOther.

Doc from java.nio.file.attribute.BasicFileAttributes.isOther.

Tells whether the file is something other than a regular file, directory, or symbolic link.

Annotations
@Override
isRegularFileback to summary
public boolean isRegularFile()

Implements java.nio.file.attribute.BasicFileAttributes.isRegularFile.

Doc from java.nio.file.attribute.BasicFileAttributes.isRegularFile.

Tells whether the file is a regular file with opaque content.

Annotations
@Override
isSameFileback to summary
pack-priv boolean isSameFile(UnixFileAttributes attrs)
lastAccessTimeback to summary
public FileTime lastAccessTime()

Implements java.nio.file.attribute.BasicFileAttributes.lastAccessTime.

Doc from java.nio.file.attribute.BasicFileAttributes.lastAccessTime.

Returns the time of last access.

If the file system implementation does not support a time stamp to indicate the time of last access then this method returns an implementation specific default value, typically the last-modified-time or a FileTime representing the epoch (1970-01-01T00:00:00Z).

Annotations
@Override
lastModifiedTimeback to summary
public FileTime lastModifiedTime()

Implements java.nio.file.attribute.BasicFileAttributes.lastModifiedTime.

Doc from java.nio.file.attribute.BasicFileAttributes.lastModifiedTime.

Returns the time of last modification.

If the file system implementation does not support a time stamp to indicate the time of last modification then this method returns an implementation specific default value, typically a FileTime representing the epoch (1970-01-01T00:00:00Z).

Annotations
@Override
modeback to summary
pack-priv int mode()
ownerback to summary
public UserPrincipal owner()

Implements java.nio.file.attribute.PosixFileAttributes.owner.

Doc from java.nio.file.attribute.PosixFileAttributes.owner.

Returns the owner of the file.

Annotations
@Override
permissionsback to summary
public Set<PosixFilePermission> permissions()

Implements java.nio.file.attribute.PosixFileAttributes.permissions.

Doc from java.nio.file.attribute.PosixFileAttributes.permissions.

Returns the permissions of the file. The file permissions are returned as a set of PosixFilePermission elements. The returned set is a copy of the file permissions and is modifiable. This allows the result to be modified and passed to the setPermissions method to update the file's permissions.

Annotations
@Override
rdevback to summary
pack-priv long rdev()
sizeback to summary
public long size()

Implements java.nio.file.attribute.BasicFileAttributes.size.

Doc from java.nio.file.attribute.BasicFileAttributes.size.

Returns the size of the file (in bytes). The size may differ from the actual size on the file system due to compression, support for sparse files, or other reasons. The size of files that are not regular files is implementation specific and therefore unspecified.

Annotations
@Override
toFileTimeback to summary
private static FileTime toFileTime(long sec, long nsec)
uidback to summary
pack-priv int uid()
sun.nio.fs back to summary

private Class UnixFileAttributes.UnixAsBasicFileAttributes

extends Object
implements BasicFileAttributes
Class Inheritance
All Implemented Interfaces
java.nio.file.attribute.BasicFileAttributes

Field Summary

Modifier and TypeField and Description
private final UnixFileAttributes

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public FileTime
public Object
fileKey()

Implements java.nio.file.attribute.BasicFileAttributes.fileKey.

Returns an object that uniquely identifies the given file, or null if a file key is not available.

public boolean
isDirectory()

Implements java.nio.file.attribute.BasicFileAttributes.isDirectory.

Tells whether the file is a directory.

public boolean
isOther()

Implements java.nio.file.attribute.BasicFileAttributes.isOther.

Tells whether the file is something other than a regular file, directory, or symbolic link.

public boolean
isRegularFile()

Implements java.nio.file.attribute.BasicFileAttributes.isRegularFile.

Tells whether the file is a regular file with opaque content.

public FileTime
lastAccessTime()

Implements java.nio.file.attribute.BasicFileAttributes.lastAccessTime.

Returns the time of last access.

public FileTime
lastModifiedTime()

Implements java.nio.file.attribute.BasicFileAttributes.lastModifiedTime.

Returns the time of last modification.

public long
size()

Implements java.nio.file.attribute.BasicFileAttributes.size.

Returns the size of the file (in bytes).

pack-priv static UnixFileAttributes.UnixAsBasicFileAttributes
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attrsback to summary
private final UnixFileAttributes attrs

Constructor Detail

UnixAsBasicFileAttributesback to summary
private UnixAsBasicFileAttributes(UnixFileAttributes attrs)

Method Detail

creationTimeback to summary
public FileTime creationTime()

Implements java.nio.file.attribute.BasicFileAttributes.creationTime.

Doc from java.nio.file.attribute.BasicFileAttributes.creationTime.

Returns the creation time. The creation time is the time that the file was created.

If the file system implementation does not support a time stamp to indicate the time when the file was created then this method returns an implementation specific default value, typically the last-modified-time or a FileTime representing the epoch (1970-01-01T00:00:00Z).

Annotations
@Override
fileKeyback to summary
public Object fileKey()

Implements java.nio.file.attribute.BasicFileAttributes.fileKey.

Doc from java.nio.file.attribute.BasicFileAttributes.fileKey.

Returns an object that uniquely identifies the given file, or null if a file key is not available. On some platforms or file systems it is possible to use an identifier, or a combination of identifiers to uniquely identify a file. Such identifiers are important for operations such as file tree traversal in file systems that support symbolic links or file systems that allow a file to be an entry in more than one directory. On UNIX file systems, for example, the device ID and inode are commonly used for such purposes.

The file key returned by this method can only be guaranteed to be unique if the file system and files remain static. Whether a file system re-uses identifiers after a file is deleted is implementation dependent and therefore unspecified.

File keys returned by this method can be compared for equality and are suitable for use in collections. If the file system and files remain static, and two files are the same with non-null file keys, then their file keys are equal.

Annotations
@Override
isDirectoryback to summary
public boolean isDirectory()

Implements java.nio.file.attribute.BasicFileAttributes.isDirectory.

Doc from java.nio.file.attribute.BasicFileAttributes.isDirectory.

Tells whether the file is a directory.

Annotations
@Override
isOtherback to summary
public boolean isOther()

Implements java.nio.file.attribute.BasicFileAttributes.isOther.

Doc from java.nio.file.attribute.BasicFileAttributes.isOther.

Tells whether the file is something other than a regular file, directory, or symbolic link.

Annotations
@Override
isRegularFileback to summary
public boolean isRegularFile()

Implements java.nio.file.attribute.BasicFileAttributes.isRegularFile.

Doc from java.nio.file.attribute.BasicFileAttributes.isRegularFile.

Tells whether the file is a regular file with opaque content.

Annotations
@Override
lastAccessTimeback to summary
public FileTime lastAccessTime()

Implements java.nio.file.attribute.BasicFileAttributes.lastAccessTime.

Doc from java.nio.file.attribute.BasicFileAttributes.lastAccessTime.

Returns the time of last access.

If the file system implementation does not support a time stamp to indicate the time of last access then this method returns an implementation specific default value, typically the last-modified-time or a FileTime representing the epoch (1970-01-01T00:00:00Z).

Annotations
@Override
lastModifiedTimeback to summary
public FileTime lastModifiedTime()

Implements java.nio.file.attribute.BasicFileAttributes.lastModifiedTime.

Doc from java.nio.file.attribute.BasicFileAttributes.lastModifiedTime.

Returns the time of last modification.

If the file system implementation does not support a time stamp to indicate the time of last modification then this method returns an implementation specific default value, typically a FileTime representing the epoch (1970-01-01T00:00:00Z).

Annotations
@Override
sizeback to summary
public long size()

Implements java.nio.file.attribute.BasicFileAttributes.size.

Doc from java.nio.file.attribute.BasicFileAttributes.size.

Returns the size of the file (in bytes). The size may differ from the actual size on the file system due to compression, support for sparse files, or other reasons. The size of files that are not regular files is implementation specific and therefore unspecified.

Annotations
@Override
wrapback to summary
pack-priv static UnixFileAttributes.UnixAsBasicFileAttributes wrap(UnixFileAttributes attrs)