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

pack-priv Class LinuxDosFileAttributeView

extends Basic
implements DosFileAttributeView
Class Inheritance
All Implemented Interfaces
java.nio.file.attribute.DosFileAttributeView, java.nio.file.attribute.BasicFileAttributeView, java.nio.file.attribute.FileAttributeView, java.nio.file.attribute.AttributeView
Imports
java.nio.file.attribute.*, java.util.Map, .Set, java.io.IOException, jdk.internal.misc.Unsafe

Linux implementation of DosFileAttributeView for use on file systems such as ext3 that have extended attributes enabled and SAMBA configured to store DOS attributes.

Field Summary

Modifier and TypeField and Description
private static final String
private static final int
private static final int
private static final String
private static final byte[]
private static final int
private static final int
private static final Set<String>
private static final String
private static final String
private static final String
private static final Unsafe
Inherited from sun.nio.fs.UnixFileAttributeViews.Basic:
filefollowLinks

Constructor Summary

AccessConstructor and Description
pack-priv
LinuxDosFileAttributeView(UnixPath file, boolean followLinks)

Method Summary

Modifier and TypeMethod and Description
private int
getDosAttribute(int fd)

Reads the value of the user.DOSATTRIB extended attribute

public String
public Map<String, Object>
readAttributes(String[] attributes)

Overrides sun.nio.fs.AbstractBasicFileAttributeView.readAttributes.

Implements sun.nio.fs.DynamicFileAttributeView.readAttributes.

Reads a set of file attributes as a bulk operation.

public DosFileAttributes
public void
setArchive(boolean value)

Implements java.nio.file.attribute.DosFileAttributeView.setArchive.

Updates the value of the archive attribute.

public void
setAttribute(String attribute, Object value)

Overrides sun.nio.fs.AbstractBasicFileAttributeView.setAttribute.

Implements sun.nio.fs.DynamicFileAttributeView.setAttribute.

Sets/updates the value of an attribute.

public void
setHidden(boolean value)

Implements java.nio.file.attribute.DosFileAttributeView.setHidden.

Updates the value of the hidden attribute.

public void
setReadOnly(boolean value)

Implements java.nio.file.attribute.DosFileAttributeView.setReadOnly.

Updates the value of the read-only attribute.

public void
setSystem(boolean value)

Implements java.nio.file.attribute.DosFileAttributeView.setSystem.

Updates the value of the system attribute.

private void
updateDosAttribute(int flag, boolean enable)

Updates the value of the user.DOSATTRIB extended attribute

Inherited from sun.nio.fs.UnixFileAttributeViews.Basic:
setTimes

Field Detail

ARCHIVE_NAMEback to summary
private static final String ARCHIVE_NAME
DOS_XATTR_ARCHIVEback to summary
private static final int DOS_XATTR_ARCHIVE
DOS_XATTR_HIDDENback to summary
private static final int DOS_XATTR_HIDDEN
DOS_XATTR_NAMEback to summary
private static final String DOS_XATTR_NAME
DOS_XATTR_NAME_AS_BYTESback to summary
private static final byte[] DOS_XATTR_NAME_AS_BYTES
DOS_XATTR_READONLYback to summary
private static final int DOS_XATTR_READONLY
DOS_XATTR_SYSTEMback to summary
private static final int DOS_XATTR_SYSTEM
dosAttributeNamesback to summary
private static final Set<String> dosAttributeNames
HIDDEN_NAMEback to summary
private static final String HIDDEN_NAME
READONLY_NAMEback to summary
private static final String READONLY_NAME
SYSTEM_NAMEback to summary
private static final String SYSTEM_NAME
unsafeback to summary
private static final Unsafe unsafe

Constructor Detail

LinuxDosFileAttributeViewback to summary
pack-priv LinuxDosFileAttributeView(UnixPath file, boolean followLinks)

Method Detail

getDosAttributeback to summary
private int getDosAttribute(int fd) throws UnixException

Reads the value of the user.DOSATTRIB extended attribute

nameback to summary
public String name()

Overrides sun.nio.fs.AbstractBasicFileAttributeView.name.

Implements java.nio.file.attribute.DosFileAttributeView.name, java.nio.file.attribute.BasicFileAttributeView.name.

Doc from java.nio.file.attribute.DosFileAttributeView.name.

Returns the name of the attribute view. Attribute views of this type have the name "dos".

Annotations
@Override
readAttributesback to summary
public Map<String, Object> readAttributes(String[] attributes) throws IOException

Overrides sun.nio.fs.AbstractBasicFileAttributeView.readAttributes.

Implements sun.nio.fs.DynamicFileAttributeView.readAttributes.

Doc from sun.nio.fs.DynamicFileAttributeView.readAttributes.

Reads a set of file attributes as a bulk operation.

Annotations
@Override
readAttributesback to summary
public DosFileAttributes readAttributes() throws IOException

Overrides sun.nio.fs.UnixFileAttributeViews.Basic.readAttributes.

Implements java.nio.file.attribute.DosFileAttributeView.readAttributes, java.nio.file.attribute.BasicFileAttributeView.readAttributes.

Doc from java.nio.file.attribute.BasicFileAttributeView.readAttributes.

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.

Annotations
@Override
Exceptions
IOException:

Doc from java.nio.file.attribute.DosFileAttributeView.readAttributes.

if an I/O error occurs

setArchiveback to summary
public void setArchive(boolean value) throws IOException

Implements java.nio.file.attribute.DosFileAttributeView.setArchive.

Doc from java.nio.file.attribute.DosFileAttributeView.setArchive.

Updates the value of the archive attribute.

It is implementation specific if the attribute can be updated as an atomic operation with respect to other file system operations. An implementation may, for example, require to read the existing value of the DOS attribute in order to update this attribute.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
setAttributeback to summary
public void setAttribute(String attribute, Object value) throws IOException

Overrides sun.nio.fs.AbstractBasicFileAttributeView.setAttribute.

Implements sun.nio.fs.DynamicFileAttributeView.setAttribute.

Doc from sun.nio.fs.DynamicFileAttributeView.setAttribute.

Sets/updates the value of an attribute.

Annotations
@Override
setHiddenback to summary
public void setHidden(boolean value) throws IOException

Implements java.nio.file.attribute.DosFileAttributeView.setHidden.

Doc from java.nio.file.attribute.DosFileAttributeView.setHidden.

Updates the value of the hidden attribute.

It is implementation specific if the attribute can be updated as an atomic operation with respect to other file system operations. An implementation may, for example, require to read the existing value of the DOS attribute in order to update this attribute.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
setReadOnlyback to summary
public void setReadOnly(boolean value) throws IOException

Implements java.nio.file.attribute.DosFileAttributeView.setReadOnly.

Doc from java.nio.file.attribute.DosFileAttributeView.setReadOnly.

Updates the value of the read-only attribute.

It is implementation specific if the attribute can be updated as an atomic operation with respect to other file system operations. An implementation may, for example, require to read the existing value of the DOS attribute in order to update this attribute.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
setSystemback to summary
public void setSystem(boolean value) throws IOException

Implements java.nio.file.attribute.DosFileAttributeView.setSystem.

Doc from java.nio.file.attribute.DosFileAttributeView.setSystem.

Updates the value of the system attribute.

It is implementation specific if the attribute can be updated as an atomic operation with respect to other file system operations. An implementation may, for example, require to read the existing value of the DOS attribute in order to update this attribute.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
updateDosAttributeback to summary
private void updateDosAttribute(int flag, boolean enable) throws IOException

Updates the value of the user.DOSATTRIB extended attribute