1.8.0_221 (Oracle Corporation) 64bit
Windows 10 (10.0) 64bit
Doesn't NIO support reading these attributes since java 7, should be no need to spawn attrib?
Yes. I forgot. DosFileAttributes supports Archive and System. isHidden() is already there.
I changed some code and it is now 0-4ms on Windows from ~90ms. Didn’t test on Linux.
What I don’t know is the correct way it should be implemented. You could change FileResource.java getAttribute() code to use DosFileAttributes instead of running attrib
change the isArchive() and isSystem() overrides and get rid of the few getAttribute() calls. I don’t know why the others were deprecated in Resource.java to start using getAttribute().
There is a setAttribute() that is using attrib also that probably needs to be changed to NIO.
nice work! can point you in the right direction
there’s also a few more ls command in the same file and a chmod just below it
I submitted a pull request. I hope I did it right. I changes the getAttribute() and setAttribute() functions.
pulled thanks for your work on this