Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 108 for Stat (0.2 sec)

  1. cmd/is-dir-empty_linux.go

    		entries, err := readDirN(dirname, 1)
    		if err != nil {
    			return false
    		}
    		return len(entries) == 0
    	}
    	var stat syscall.Stat_t
    	if err := syscall.Stat(dirname, &stat); err != nil {
    		return false
    	}
    	return stat.Mode&syscall.S_IFMT == syscall.S_IFDIR && stat.Nlink == 2
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 05 15:17:08 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  2. internal/disk/disk_unix.go

    	"syscall"
    )
    
    // SameDisk reports whether di1 and di2 describe the same disk.
    func SameDisk(disk1, disk2 string) (bool, error) {
    	st1 := syscall.Stat_t{}
    	st2 := syscall.Stat_t{}
    
    	if err := syscall.Stat(disk1, &st1); err != nil {
    		return false, err
    	}
    
    	if err := syscall.Stat(disk2, &st2); err != nil {
    		return false, err
    	}
    
    	return st1.Dev == st2.Dev, nil
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Aug 19 01:35:22 GMT 2021
    - 1.2K bytes
    - Viewed (0)
  3. docs/debugging/reorder-disks/main.go

    }
    
    type localDisk struct {
    	index int
    	path  string
    }
    
    func getMajorMinor(path string) (string, error) {
    	var stat syscall.Stat_t
    	if err := syscall.Stat(path, &stat); err != nil {
    		return "", fmt.Errorf("unable to stat `%s`: %w", path, err)
    	}
    
    	devID := uint64(stat.Dev)
    	major := (devID & 0x00000000000fff00) >> 8
    	major |= (devID & 0xfffff00000000000) >> 32
    	minor := (devID & 0x00000000000000ff) >> 0
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  4. internal/mountinfo/mountinfo_linux.go

    	// If the directory has a different device as parent, then it is a mountpoint.
    	if s1.Sys().(*syscall.Stat_t).Dev != s2.Sys().(*syscall.Stat_t).Dev {
    		//  path/.. on a different device as path
    		return true
    	}
    
    	// path/.. is the same i-node as path - this check is for bind mounts.
    	return s1.Sys().(*syscall.Stat_t).Ino == s2.Sys().(*syscall.Stat_t).Ino
    }
    
    // CheckCrossDevice - check if any list of paths has any sub-mounts at /proc/mounts.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.7K bytes
    - Viewed (0)
  5. cmd/metrics-v2.go

    					Value:          stat.Failed.LastMinute.Count,
    					VariableLabels: map[string]string{"endpoint": stat.Endpoint},
    				})
    				ml = append(ml, MetricV2{
    					Description:    getRepFailedBytesLastHourMD(clusterMetricNamespace),
    					Value:          float64(stat.Failed.LastHour.Bytes),
    					VariableLabels: map[string]string{"endpoint": stat.Endpoint},
    				})
    				ml = append(ml, MetricV2{
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 22:01:31 GMT 2024
    - 132.6K bytes
    - Viewed (0)
  6. cmd/os-instrumented.go

    func Remove(deletePath string) (err error) {
    	defer updateOSMetrics(osMetricRemove, deletePath)(err)
    	return os.Remove(deletePath)
    }
    
    // Stat captures time taken to call os.Stat
    func Stat(name string) (info os.FileInfo, err error) {
    	defer updateOSMetrics(osMetricStat, name)(err)
    	return os.Stat(name)
    }
    
    // Create captures time taken to call os.Create
    func Create(name string) (f *os.File, err error) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 15 01:09:38 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  7. cmd/kms-handlers.go

    		return
    	}
    
    	stat, err := GlobalKMS.Stat(ctx)
    	if err != nil {
    		writeCustomErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInternalError), err.Error(), r.URL)
    		return
    	}
    
    	status := madmin.KMSStatus{
    		Name:         stat.Name,
    		DefaultKeyID: stat.DefaultKey,
    		Endpoints:    make(map[string]madmin.ItemState, len(stat.Endpoints)),
    	}
    	for _, endpoint := range stat.Endpoints {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 20.7K bytes
    - Viewed (0)
  8. cmd/tier-journal.go

    // nothing. Otherwise renames the active journal to a read-only journal and
    // opens a new active journal.
    func (jd *tierDiskJournal) rotate() error {
    	// Do nothing if a read-only journal file already exists.
    	if _, err := os.Stat(jd.ReadOnlyPath()); err == nil {
    		return nil
    	}
    	// Close the active journal if present and delete it.
    	return jd.Close()
    }
    
    type walkFn func(ctx context.Context, objName, rvID, tierName string) error
    
    Go
    - Registered: Sun Feb 25 19:28:16 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  9. internal/config/lambda/event/targetlist.go

    import (
    	"fmt"
    	"net/http"
    	"strings"
    	"sync"
    )
    
    // Target - lambda target interface
    type Target interface {
    	ID() TargetID
    	IsActive() (bool, error)
    	Send(Event) (*http.Response, error)
    	Stat() TargetStat
    	Close() error
    }
    
    // TargetStats is a collection of stats for multiple targets.
    type TargetStats struct {
    	TargetStats map[string]TargetStat
    }
    
    // TargetStat is the stats of a single target.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 07 16:12:41 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  10. cmd/data-usage_test.go

    	}
    	createUsageTestFiles(t, base, bucket, files)
    
    	getSize := func(item scannerItem) (sizeS sizeSummary, err error) {
    		if item.Typ&os.ModeDir == 0 {
    			var s os.FileInfo
    			s, err = os.Stat(item.Path)
    			if err != nil {
    				return
    			}
    			sizeS.totalSize = s.Size()
    			sizeS.versions++
    			return sizeS, nil
    		}
    		return
    	}
    
    	weSleep := func() bool { return false }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Mar 27 15:10:40 GMT 2024
    - 14.1K bytes
    - Viewed (0)
Back to top