fs

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2024 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package fs implements function for getting the size of a given directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetSizer

type GetSizer interface {
	GetSize(string) int64
}

GetSizer is the interface that wraps the `GetSize` method.

func New

func New(ty Type) GetSizer

New returns different `GetSizer` depending on the passed `Type`.

type Type

type Type byte

Type represents different kinds of file system.

const (
	// DEFAULT represents the default file system. Always return -1 as size.
	DEFAULT Type = iota
	// XFS is the XFS file system. Getting the size by running `sudo -n xfs_quota -c "quota -pN $name"`.
	XFS
	// ZFS is the ZFS file system. Getting the size by running `df -B1 --output=used`.
	ZFS
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL