[disk] Add comment to disk.Usage().

This commit is contained in:
WAKAYAMA Shirou 2017-07-14 15:33:53 +09:00
parent 09e9859714
commit 66b0ca3121
1 changed files with 3 additions and 0 deletions

View File

@ -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)