12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- package amntfs
- import (
- "fmt"
- "git.swzry.com/ProjectNagae/FsUtils/mountree"
- "github.com/spf13/afero"
- )
- var _ mountree.PayloadType = (*MountNode)(nil)
- type MountNode struct {
- mountId int64
- mountPoint string
- filesystemType string
- filesystem afero.Fs
- }
- func (m MountNode) MountId() int64 {
- return m.mountId
- }
- func (m MountNode) MountPoint() string {
- return m.mountPoint
- }
- func (m MountNode) FsType() string {
- return m.filesystemType
- }
- func (m MountNode) Name() string {
- return fmt.Sprintf("%08X", m.mountId)
- }
- func (m MountNode) Description() string {
- return fmt.Sprintf("%s[MID=%08X]@'%s'", m.filesystemType, m.mountId, m.mountPoint)
- }
- func (m MountNode) GetFs() afero.Fs {
- return m.filesystem
- }
- type MountInfoEntity struct {
- MountId int64
- MountPoint string
- FsType string
- }
|