Given a file and we have to find its attributes using java program.
Following packages are using here, to implement this program,
- java.nio.file.*
- java.nio.file.attribute.*
There are following two important classes, which are using this program to get the DOS based file attributes
- DosFileAttributeView
- DosFileAttributes
The method readAttributes() of DosFileAttributeView is using to is using to get the Basic file attributes.
Program to get DOS based basic file attributes in java
Output