How can I use OSHI to get a file's HWDiskStore?

51 Views Asked by At

Recently I was required to use OSHI to monitor hardware, a request is to get a file's HWDiskStore, I searched OSHI's api for a while, and didn't find a specific method just like FileStore getFileStore(Path path) to achieve the request, I already known that Sigar could get a file's mountpoint such like sigar.getFileSystemMap().getMountPoint(pathName).getDirName(), so I wonder that if OSHI has similar method to get file's mountpoint. Any help is appreciated!

0

There are 0 best solutions below