linux - How to retrieve Java NIO PosixFilePermission during a Files.walkFileTree? -


on unix, files.walkfiletree callback filevisitor.visitfile basicfileattributes sun.nio.fs.unixfileattributes$unixasbasicfileattributes. debugger shows, wrapped unixfileattributes contain permission information (st_mode field populated). there (graceful) way unwrap unixfileattributes$unixasbasicfileattributes in order @ least posixfileattributes permissions accessible? reflection not work me, results in illegalaccesserror when trying invoke unixfileattributes$unixasbasicfileattributes.unwrap.

also, want avoid explicitly call files.getposixfilepermissions(file) every reported file gives 10% overhead test cases.


Comments

Popular posts from this blog

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -