Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 142 for StatFS (0.77 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. src/syscall/zsysnum_dragonfly_amd64.go

    	SYS_SETSID        = 147 // { int setsid(void); }
    	SYS_QUOTACTL      = 148 // { int quotactl(char *path, int cmd, int uid, \
    	SYS_STATFS        = 157 // { int statfs(char *path, struct statfs *buf); }
    	SYS_FSTATFS       = 158 // { int fstatfs(int fd, struct statfs *buf); }
    	SYS_GETFH         = 161 // { int getfh(char *fname, struct fhandle *fhp); }
    	SYS_GETDOMAINNAME = 162 // { int getdomainname(char *domainname, int len); }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 22.9K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go

    //sys	Lstat(path string, stat *Stat_t) (err error)
    //sys	ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
    //sys	Stat(path string, stat *Stat_t) (err error)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go

    //sys	Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
    //sys	ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace
    //sys	Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top