增加获取磁盘挂载点接口
This commit is contained in:
1 parent
21e8e8f1b8
commit
c955afd861
3 files changed
+16
-2
No files matched your search
@@ -97,6 +97,10 @@ func GetDiskInfo() ([]DiskInfo, error) {
|
||||
return disks, nil
|
||||
}
|
||||
|
||||
func GetDiskMountpoints() ([]disk.PartitionStat, error) {
|
||||
return disk.Partitions(true)
|
||||
}
|
||||
|
||||
func GetDiskInfoByPath(path string) (*DiskInfo, error) {
|
||||
diskInfo := DiskInfo{}
|
||||
usage, err := disk.Usage(path)
|
||||
|
||||
Reference in new issue
Block a user