[disk] Add comment to disk.Usage().
This commit is contained in:
parent
09e9859714
commit
66b0ca3121
|
@ -4,6 +4,9 @@ package disk
|
|||
|
||||
import "golang.org/x/sys/unix"
|
||||
|
||||
// Usage returns a file system usage. path is a filessytem path such
|
||||
// as "/", not device file path like "/dev/vda1". If you want to use
|
||||
// a return value of disk.Partitions, use "Mountpoint" not "Device".
|
||||
func Usage(path string) (*UsageStat, error) {
|
||||
stat := unix.Statfs_t{}
|
||||
err := unix.Statfs(path, &stat)
|
||||
|
|
Loading…
Reference in New Issue