Documentation ¶
Index ¶
- Constants
- func ChangeAllBlkdevsParams(params map[string]string)
- func ChangeBlkdevParameter(dev, key, value string)
- func CleanFailedMountpoints()
- func Cleandir(sPath string, keepdir bool) error
- func Exists(filepath string) bool
- func FastCheckSum(filePath string) (string, error)
- func FileAppendContents(filename string, content string) error
- func FileFastHash(filename string, hashAlgo []hash.Hash, rate int) ([][]byte, error)
- func FileGetContents(file string) (string, error)
- func FileHash(filename string, hash []hash.Hash) ([][]byte, error)
- func FilePutContents(filename string, content string, modAppend bool) error
- func FileSetContents(filename string, content string) error
- func FileSize(name string) int64
- func FsFormatToDiskType(fsFormat string) string
- func GetAllBlkdevsIoSchedulers() ([]string, error)
- func GetBlkdevConfig(dev, key string) (string, error)
- func GetBlkidType(filepath string) string
- func GetDevId(spath string) string
- func GetDevOfPath(spath string) string
- func GetDevUuid(dev string) (map[string]string, error)
- func GetFsFormat(diskPath string) string
- func IsBlockDevMounted(dev string) bool
- func IsBlockDeviceUsed(dev string) bool
- func IsDir(filepath string) bool
- func IsFile(filepath string) bool
- func MD5(filename string) (string, error)
- func SHA1(filename string) (string, error)
- func SHA256(filename string) (string, error)
- func SHA512(filename string) (string, error)
- func SumHashes(sums [][]byte) []byte
- func Writable(path string) bool
- func Zerofiles(sPath string) error
- type HostsFile
- type Partition
- type SReadSeeker
- type SparseFileWriter
Constants ¶
View Source
const ( BLOCK_SIZE = 32 * 1024 // 2**15 BLOCK_WIDTH = 15 )
Variables ¶
This section is empty.
Functions ¶
func ChangeAllBlkdevsParams ¶
func ChangeBlkdevParameter ¶
func ChangeBlkdevParameter(dev, key, value string)
func CleanFailedMountpoints ¶
func CleanFailedMountpoints()
func FastCheckSum ¶
func FileAppendContents ¶
func FileFastHash ¶
func FileGetContents ¶
func FileSetContents ¶
func FsFormatToDiskType ¶
func GetBlkdevConfig ¶
func GetBlkidType ¶
func GetDevOfPath ¶
func GetFsFormat ¶
func IsBlockDevMounted ¶
func IsBlockDeviceUsed ¶
Types ¶
type Partition ¶
type Partition struct { Index int Bootable bool Start int64 End int64 Count int64 DiskType string Fs string DevName string }
func NewPartition ¶
type SReadSeeker ¶
type SReadSeeker struct {
// contains filtered or unexported fields
}
func NewReadSeeker ¶
func NewReadSeeker(reader io.Reader, size int64) (*SReadSeeker, error)
func (*SReadSeeker) Close ¶
func (s *SReadSeeker) Close() error
type SparseFileWriter ¶
func NewSparseFileWriter ¶
func NewSparseFileWriter(f *os.File) *SparseFileWriter
func (*SparseFileWriter) Close ¶
func (w *SparseFileWriter) Close() (err error)
func (*SparseFileWriter) PreClose ¶
func (w *SparseFileWriter) PreClose() error
Click to show internal directories.
Click to hide internal directories.