@ParametersAreNonnullByDefault public abstract class DosFileAttributesProvider extends FileAttributesProvider implements DosFileAttributeView, DosFileAttributes
"dos" file attribute view
The defaults are the same as those defined by BasicFileAttributesProvider, with no other defaults added.
DosFileAttributeView,
DosFileAttributes| Modifier and Type | Field and Description |
|---|---|
protected static FileTime |
UNIX_EPOCH |
| Modifier | Constructor and Description |
|---|---|
protected |
DosFileAttributesProvider() |
| Modifier and Type | Method and Description |
|---|---|
FileTime |
creationTime() |
Object |
fileKey() |
Map<String,Object> |
getAllAttributes()
Get all attributes for this view
|
Object |
getAttributeByName(String name)
Get an attribute value by name
|
boolean |
isOther() |
boolean |
isSymbolicLink() |
FileTime |
lastAccessTime() |
FileTime |
lastModifiedTime() |
DosFileAttributes |
readAttributes() |
void |
setArchive(boolean value) |
void |
setAttributeByName(String name,
Object value)
Set one attribute by name
|
void |
setHidden(boolean value) |
void |
setReadOnly(boolean value) |
void |
setSystem(boolean value) |
void |
setTimes(FileTime lastModifiedTime,
FileTime lastAccessTime,
FileTime createTime) |
nameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnameisArchive, isHidden, isReadOnly, isSystemisDirectory, isRegularFile, sizeprotected static final FileTime UNIX_EPOCH
protected DosFileAttributesProvider()
throws IOException
IOExceptionpublic final DosFileAttributes readAttributes() throws IOException
readAttributes in interface BasicFileAttributeViewreadAttributes in interface DosFileAttributeViewIOExceptionpublic FileTime lastModifiedTime()
lastModifiedTime in interface BasicFileAttributespublic FileTime lastAccessTime()
lastAccessTime in interface BasicFileAttributespublic FileTime creationTime()
creationTime in interface BasicFileAttributespublic boolean isSymbolicLink()
isSymbolicLink in interface BasicFileAttributespublic boolean isOther()
isOther in interface BasicFileAttributespublic Object fileKey()
fileKey in interface BasicFileAttributespublic void setTimes(@Nullable FileTime lastModifiedTime, @Nullable FileTime lastAccessTime, @Nullable FileTime createTime) throws IOException
setTimes in interface BasicFileAttributeViewIOExceptionpublic void setArchive(boolean value)
throws IOException
setArchive in interface DosFileAttributeViewIOExceptionpublic void setSystem(boolean value)
throws IOException
setSystem in interface DosFileAttributeViewIOExceptionpublic void setHidden(boolean value)
throws IOException
setHidden in interface DosFileAttributeViewIOExceptionpublic void setReadOnly(boolean value)
throws IOException
setReadOnly in interface DosFileAttributeViewIOExceptionpublic final void setAttributeByName(String name, Object value) throws IOException
FileAttributesProvidersetAttributeByName in class FileAttributesProvidername - the name of the attributevalue - the value of the attributeIOException - I/O error when trying to set the attributeReadOnlyAttributeException - the attribute is read only@Nonnull public final Object getAttributeByName(String name) throws IOException
FileAttributesProvidergetAttributeByName in class FileAttributesProvidername - the name of the attributeIOException - I/O error when trying to set the attribute@Nonnull public final Map<String,Object> getAllAttributes() throws IOException
FileAttributesProviderThe returned map will have the attribute names as keys and their
values as values. The returned map must be immutable (use
Collections.unmodifiableMap(Map) for instance).
The order of keys in the returned map is not guaranteed.
getAllAttributes in class FileAttributesProviderIOException - failure to read one or more attributes