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!
How can I use OSHI to get a file's HWDiskStore?
51 views Asked by wangzewei At
0