- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 43 for StatFS (0.09 sec)
-
pkg/volume/util/fs/fs.go
statfs := &unix.Statfs_t{} err := unix.Statfs(path, statfs) if err != nil { return 0, 0, 0, 0, 0, 0, err } // Available is blocks available * fragment size available := int64(statfs.Bavail) * int64(statfs.Bsize) // Capacity is total block count * fragment size capacity := int64(statfs.Blocks) * int64(statfs.Bsize)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jan 20 02:56:02 UTC 2022 - 3.8K bytes - Viewed (0) -
src/io/fs/stat.go
package fs // A StatFS is a file system with a Stat method. type StatFS interface { FS // Stat returns a FileInfo describing the file. // If there is an error, it should be of type *PathError. Stat(name string) (FileInfo, error) } // Stat returns a [FileInfo] describing the named file from the file system. // // If fs implements [StatFS], Stat calls fs.Stat.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 11 20:25:50 UTC 2023 - 803 bytes - Viewed (0) -
pkg/volume/metrics_du_unix_test.go
limitations under the License. */ package volume_test import ( "golang.org/x/sys/unix" ) func getExpectedBlockSize(path string) int64 { statfs := &unix.Statfs_t{} err := unix.Statfs(path, statfs) if err != nil { return 0 } return int64(statfs.Bsize)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Jan 01 00:18:31 UTC 2023 - 840 bytes - Viewed (0) -
pkg/volume/emptydir/empty_dir_linux.go
if err != nil { return v1.StorageMediumDefault, false, nil, fmt.Errorf("IsLikelyNotMountPoint(%q): %v", path, err) } buf := unix.Statfs_t{} if err := unix.Statfs(path, &buf); err != nil { return v1.StorageMediumDefault, false, nil, fmt.Errorf("statfs(%q): %v", path, err) } klog.V(3).Infof("Statfs_t of %v: %+v", path, buf) if buf.Type == linuxTmpfsMagic { return v1.StorageMediumMemory, !notMnt, nil, nil
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 24 19:47:49 UTC 2021 - 3.6K bytes - Viewed (0) -
src/io/fs/stat_test.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package fs_test import ( "fmt" . "io/fs" "testing" ) type statOnly struct{ StatFS } func (statOnly) Open(name string) (File, error) { return nil, ErrNotExist } func TestStat(t *testing.T) { check := func(desc string, info FileInfo, err error) { t.Helper()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 20 17:53:02 UTC 2020 - 949 bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 1.4K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 1.5K bytes - Viewed (0) -
internal/disk/stat_freebsd.go
import ( "errors" "fmt" "syscall" ) // GetInfo returns total and free bytes available in a directory, e.g. `/`. func GetInfo(path string, _ bool) (info Info, err error) { s := syscall.Statfs_t{} err = syscall.Statfs(path, &s) if err != nil { return Info{}, err } reservedBlocks := s.Bfree - uint64(s.Bavail) info = Info{ Total: uint64(s.Bsize) * (s.Blocks - reservedBlocks), Free: uint64(s.Bsize) * uint64(s.Bavail),
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Feb 26 19:34:50 UTC 2024 - 1.7K bytes - Viewed (0) -
internal/disk/stat_bsd.go
import ( "errors" "fmt" "syscall" ) // GetInfo returns total and free bytes available in a directory, e.g. `/`. func GetInfo(path string, _ bool) (info Info, err error) { s := syscall.Statfs_t{} err = syscall.Statfs(path, &s) if err != nil { return Info{}, err } reservedBlocks := s.Bfree - s.Bavail info = Info{ Total: uint64(s.Bsize) * (s.Blocks - reservedBlocks), Free: uint64(s.Bsize) * s.Bavail,
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Feb 26 19:34:50 UTC 2024 - 1.7K bytes - Viewed (0) -
internal/disk/stat_openbsd.go
import ( "errors" "fmt" "syscall" ) // GetInfo returns total and free bytes available in a directory, e.g. `/`. func GetInfo(path string, _ bool) (info Info, err error) { s := syscall.Statfs_t{} err = syscall.Statfs(path, &s) if err != nil { return Info{}, err } reservedBlocks := uint64(s.F_bfree) - uint64(s.F_bavail) info = Info{ Total: uint64(s.F_bsize) * (uint64(s.F_blocks) - reservedBlocks),
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Feb 26 19:34:50 UTC 2024 - 1.8K bytes - Viewed (0)