Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for GetInfo (0.29 sec)

  1. internal/disk/stat_bsd.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package disk
    
    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
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  2. internal/disk/stat_linux_32bit.go

    	fsTypeHex := strconv.FormatInt(int64(ftype), 16)
    	fsTypeString, ok := fsType2StringMap[fsTypeHex]
    	if !ok {
    		return "UNKNOWN"
    	}
    	return fsTypeString
    }
    
    // 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
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  3. internal/disk/stat_solaris.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package disk
    
    import (
    	"errors"
    	"fmt"
    
    	"golang.org/x/sys/unix"
    )
    
    // GetInfo returns total and free bytes available in a directory, e.g. `/`.
    func GetInfo(path string, _ bool) (info Info, err error) {
    	s := unix.Statvfs_t{}
    	if err = unix.Statvfs(path, &s); err != nil {
    		return Info{}, err
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  4. internal/disk/stat_netbsd.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package disk
    
    import (
    	"errors"
    	"fmt"
    
    	"golang.org/x/sys/unix"
    )
    
    // GetInfo returns total and free bytes available in a directory, e.g. `/`.
    func GetInfo(path string, _ bool) (info Info, err error) {
    	s := unix.Statvfs_t{}
    	if err = unix.Statvfs(path, &s); err != nil {
    		return Info{}, err
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  5. internal/disk/stat_openbsd.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package disk
    
    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
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  6. internal/disk/stat_freebsd.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package disk
    
    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
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  7. internal/disk/stat_windows.go

    	GetDiskFreeSpace = kernel32.NewProc("GetDiskFreeSpaceW")
    )
    
    // GetInfo returns total and free bytes available in a directory, e.g. `C:\`.
    // It returns free space available to the user (including quota limitations)
    //
    // https://msdn.microsoft.com/en-us/library/windows/desktop/aa364937(v=vs.85).aspx
    func GetInfo(path string, _ bool) (info Info, err error) {
    	// Stat to know if the path exists.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  8. internal/disk/stat_linux_s390x.go

    	fsTypeHex := strconv.FormatUint(uint64(ftype), 16)
    	fsTypeString, ok := fsType2StringMap[fsTypeHex]
    	if !ok {
    		return "UNKNOWN"
    	}
    	return fsTypeString
    }
    
    // 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
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 2.6K bytes
    - Viewed (2)
  9. internal/disk/stat_linux.go

    	"fmt"
    	"io"
    	"os"
    	"path/filepath"
    	"strconv"
    	"strings"
    	"syscall"
    
    	"github.com/prometheus/procfs/blockdevice"
    	"golang.org/x/sys/unix"
    )
    
    // GetInfo returns total and free bytes available in a directory, e.g. `/`.
    func GetInfo(path string, firstTime bool) (info Info, err error) {
    	s := syscall.Statfs_t{}
    	err = syscall.Statfs(path, &s)
    	if err != nil {
    		return Info{}, err
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 26 19:34:50 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  10. cmd/xl-storage.go

    			go s.cleanupTrashImmediateCallers(GlobalContext)
    		}
    	}()
    
    	s.drivePath, err = getValidPath(ep.Path)
    	if err != nil {
    		s.drivePath = ep.Path
    		return s, err
    	}
    
    	info, err := disk.GetInfo(s.drivePath, true)
    	if err != nil {
    		return s, err
    	}
    	s.major = info.Major
    	s.minor = info.Minor
    	s.fsType = info.FSType
    
    	if !globalIsCICD && !globalIsErasureSD {
    		var rootDrive bool
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 84.7K bytes
    - Viewed (0)
Back to top