Documentation ¶
Index ¶
- Constants
- func CompareDirectoriesMetadata(left, right *DirectoryInode, logWriter io.Writer) bool
- func CompareDirectoryEntries(left, right *DirectoryEntry, logWriter io.Writer) bool
- func CompareDirectoryInodes(left, right *DirectoryInode, logWriter io.Writer) bool
- func CompareFileSystems(left, right *FileSystem, logWriter io.Writer) bool
- func CompareInodes(left, right GenericInode, logWriter io.Writer) (sameType, sameMetadata, sameData bool)
- func CompareRegularInodes(left, right *RegularInode, logWriter io.Writer) bool
- func CompareRegularInodesData(left, right *RegularInode, logWriter io.Writer) bool
- func CompareRegularInodesMetadata(left, right *RegularInode, logWriter io.Writer) bool
- func CompareSpecialInodes(left, right *SpecialInode, logWriter io.Writer) bool
- func CompareSpecialInodesData(left, right *SpecialInode, logWriter io.Writer) bool
- func CompareSpecialInodesMetadata(left, right *SpecialInode, logWriter io.Writer) bool
- func CompareSymlinkInodes(left, right *SymlinkInode, logWriter io.Writer) bool
- func CompareSymlinkInodesData(left, right *SymlinkInode, logWriter io.Writer) bool
- func CompareSymlinkInodesMetadata(left, right *SymlinkInode, logWriter io.Writer) bool
- func ForceWriteMetadata(inode GenericInode, name string) error
- type ComputedRegularInode
- func (inode *ComputedRegularInode) GetGid() uint32
- func (inode *ComputedRegularInode) GetUid() uint32
- func (inode *ComputedRegularInode) List(w io.Writer, name string, numLinksTable NumLinksTable, numLinks int, ...) error
- func (inode *ComputedRegularInode) SetGid(gid uint32)
- func (inode *ComputedRegularInode) SetUid(uid uint32)
- func (inode *ComputedRegularInode) WriteMetadata(name string) error
- type DirectoryEntry
- type DirectoryInode
- func (directory *DirectoryInode) BuildEntryMap()
- func (inode *DirectoryInode) GetGid() uint32
- func (inode *DirectoryInode) GetUid() uint32
- func (inode *DirectoryInode) List(w io.Writer, name string, numLinksTable NumLinksTable, numLinks int, ...) error
- func (inode *DirectoryInode) RegisterStrings(registerFunc func(string))
- func (inode *DirectoryInode) ReplaceStrings(replaceFunc func(string) string)
- func (inode *DirectoryInode) SetGid(gid uint32)
- func (inode *DirectoryInode) SetUid(uid uint32)
- func (inode *DirectoryInode) Write(name string) error
- func (inode *DirectoryInode) WriteMetadata(name string) error
- type FileMode
- type FileSystem
- func (fs *FileSystem) BuildNumLinksTable() NumLinksTable
- func (fs *FileSystem) ComputeTotalDataBytes()
- func (fs *FileSystem) Encode(writer io.Writer) error
- func (fs *FileSystem) EstimateUsage(blockSize uint64) uint64
- func (fs *FileSystem) FilenameToInodeTable() FilenameToInodeTable
- func (fs *FileSystem) Filter(filter *filter.Filter) *FileSystem
- func (fs *FileSystem) ForEachFile(fn func(name string, inodeNumber uint64, inode GenericInode) error) error
- func (fs *FileSystem) GetObjects() map[hash.Hash]uint64
- func (fs *FileSystem) HashToInodesTable() HashToInodesTable
- func (fs *FileSystem) InodeToFilenamesTable() InodeToFilenamesTable
- func (fs *FileSystem) List(w io.Writer) error
- func (fs *FileSystem) Listf(w io.Writer, listSelector ListSelector, filter *filter.Filter) error
- func (fs *FileSystem) NumComputedRegularInodes() uint64
- func (fs *FileSystem) RebuildInodePointers() error
- func (fs *FileSystem) String() string
- type FilenameToInodeTable
- type GenericInode
- type HashToInodesTable
- type InodeTable
- type InodeToFilenamesTable
- type ListSelector
- type NumLinksTable
- type RegularInode
- func (inode *RegularInode) GetGid() uint32
- func (inode *RegularInode) GetUid() uint32
- func (inode *RegularInode) List(w io.Writer, name string, numLinksTable NumLinksTable, numLinks int, ...) error
- func (inode *RegularInode) SetGid(gid uint32)
- func (inode *RegularInode) SetUid(uid uint32)
- func (inode *RegularInode) WriteMetadata(name string) error
- type SpecialInode
- func (inode *SpecialInode) GetGid() uint32
- func (inode *SpecialInode) GetUid() uint32
- func (inode *SpecialInode) List(w io.Writer, name string, numLinksTable NumLinksTable, numLinks int, ...) error
- func (inode *SpecialInode) SetGid(gid uint32)
- func (inode *SpecialInode) SetUid(uid uint32)
- func (inode *SpecialInode) Write(name string) error
- func (inode *SpecialInode) WriteMetadata(name string) error
- type SymlinkInode
- func (inode *SymlinkInode) GetGid() uint32
- func (inode *SymlinkInode) GetUid() uint32
- func (inode *SymlinkInode) List(w io.Writer, name string, numLinksTable NumLinksTable, numLinks int, ...) error
- func (inode *SymlinkInode) SetGid(gid uint32)
- func (inode *SymlinkInode) SetUid(uid uint32)
- func (inode *SymlinkInode) Write(name string) error
- func (inode *SymlinkInode) WriteMetadata(name string) error
Constants ¶
View Source
const ( ListSelectSkipMode = 1 << iota ListSelectSkipNumLinks ListSelectSkipUid ListSelectSkipGid ListSelectSkipSizeDevnum ListSelectSkipMtime ListSelectSkipName ListSelectSkipData ListSelectAll = 0 )
Variables ¶
This section is empty.
Functions ¶
func CompareDirectoriesMetadata ¶
func CompareDirectoriesMetadata(left, right *DirectoryInode, logWriter io.Writer) bool
func CompareDirectoryEntries ¶
func CompareDirectoryEntries(left, right *DirectoryEntry, logWriter io.Writer) bool
func CompareDirectoryInodes ¶
func CompareDirectoryInodes(left, right *DirectoryInode, logWriter io.Writer) bool
func CompareFileSystems ¶
func CompareFileSystems(left, right *FileSystem, logWriter io.Writer) bool
func CompareInodes ¶
func CompareInodes(left, right GenericInode, logWriter io.Writer) ( sameType, sameMetadata, sameData bool)
func CompareRegularInodes ¶
func CompareRegularInodes(left, right *RegularInode, logWriter io.Writer) bool
func CompareRegularInodesData ¶
func CompareRegularInodesData(left, right *RegularInode, logWriter io.Writer) bool
func CompareRegularInodesMetadata ¶
func CompareRegularInodesMetadata(left, right *RegularInode, logWriter io.Writer) bool
func CompareSpecialInodes ¶
func CompareSpecialInodes(left, right *SpecialInode, logWriter io.Writer) bool
func CompareSpecialInodesData ¶
func CompareSpecialInodesData(left, right *SpecialInode, logWriter io.Writer) bool
func CompareSpecialInodesMetadata ¶
func CompareSpecialInodesMetadata(left, right *SpecialInode, logWriter io.Writer) bool
func CompareSymlinkInodes ¶
func CompareSymlinkInodes(left, right *SymlinkInode, logWriter io.Writer) bool
func CompareSymlinkInodesData ¶
func CompareSymlinkInodesData(left, right *SymlinkInode, logWriter io.Writer) bool
func CompareSymlinkInodesMetadata ¶
func CompareSymlinkInodesMetadata(left, right *SymlinkInode, logWriter io.Writer) bool
func ForceWriteMetadata ¶
func ForceWriteMetadata(inode GenericInode, name string) error
Types ¶
type ComputedRegularInode ¶
func (*ComputedRegularInode) GetGid ¶
func (inode *ComputedRegularInode) GetGid() uint32
func (*ComputedRegularInode) GetUid ¶
func (inode *ComputedRegularInode) GetUid() uint32
func (*ComputedRegularInode) List ¶
func (inode *ComputedRegularInode) List(w io.Writer, name string, numLinksTable NumLinksTable, numLinks int, listSelector ListSelector, filter *filter.Filter) error
func (*ComputedRegularInode) SetGid ¶
func (inode *ComputedRegularInode) SetGid(gid uint32)
func (*ComputedRegularInode) SetUid ¶
func (inode *ComputedRegularInode) SetUid(uid uint32)
func (*ComputedRegularInode) WriteMetadata ¶
func (inode *ComputedRegularInode) WriteMetadata(name string) error
type DirectoryEntry ¶
type DirectoryEntry struct { Name string InodeNumber uint64 // contains filtered or unexported fields }
func (*DirectoryEntry) Inode ¶
func (dirent *DirectoryEntry) Inode() GenericInode
func (*DirectoryEntry) SetInode ¶
func (dirent *DirectoryEntry) SetInode(inode GenericInode)
func (*DirectoryEntry) String ¶
func (dirent *DirectoryEntry) String() string
type DirectoryInode ¶
type DirectoryInode struct { EntryList []*DirectoryEntry EntriesByName map[string]*DirectoryEntry Mode FileMode Uid uint32 Gid uint32 }
func (*DirectoryInode) BuildEntryMap ¶
func (directory *DirectoryInode) BuildEntryMap()
func (*DirectoryInode) GetGid ¶
func (inode *DirectoryInode) GetGid() uint32
func (*DirectoryInode) GetUid ¶
func (inode *DirectoryInode) GetUid() uint32
func (*DirectoryInode) List ¶
func (inode *DirectoryInode) List(w io.Writer, name string, numLinksTable NumLinksTable, numLinks int, listSelector ListSelector, filter *filter.Filter) error
func (*DirectoryInode) RegisterStrings ¶ added in v0.3.3
func (inode *DirectoryInode) RegisterStrings(registerFunc func(string))
func (*DirectoryInode) ReplaceStrings ¶
func (inode *DirectoryInode) ReplaceStrings(replaceFunc func(string) string)
func (*DirectoryInode) SetGid ¶
func (inode *DirectoryInode) SetGid(gid uint32)
func (*DirectoryInode) SetUid ¶
func (inode *DirectoryInode) SetUid(uid uint32)
func (*DirectoryInode) Write ¶
func (inode *DirectoryInode) Write(name string) error
func (*DirectoryInode) WriteMetadata ¶
func (inode *DirectoryInode) WriteMetadata(name string) error
type FileSystem ¶
type FileSystem struct { InodeTable InodeTable NumRegularInodes uint64 TotalDataBytes uint64 DirectoryCount uint64 DirectoryInode // contains filtered or unexported fields }
func (*FileSystem) BuildNumLinksTable ¶ added in v0.3.2
func (fs *FileSystem) BuildNumLinksTable() NumLinksTable
func (*FileSystem) ComputeTotalDataBytes ¶
func (fs *FileSystem) ComputeTotalDataBytes()
func (*FileSystem) EstimateUsage ¶
func (fs *FileSystem) EstimateUsage(blockSize uint64) uint64
func (*FileSystem) FilenameToInodeTable ¶
func (fs *FileSystem) FilenameToInodeTable() FilenameToInodeTable
func (*FileSystem) Filter ¶
func (fs *FileSystem) Filter(filter *filter.Filter) *FileSystem
func (*FileSystem) ForEachFile ¶
func (fs *FileSystem) ForEachFile( fn func(name string, inodeNumber uint64, inode GenericInode) error) error
func (*FileSystem) GetObjects ¶
func (fs *FileSystem) GetObjects() map[hash.Hash]uint64
func (*FileSystem) HashToInodesTable ¶
func (fs *FileSystem) HashToInodesTable() HashToInodesTable
func (*FileSystem) InodeToFilenamesTable ¶
func (fs *FileSystem) InodeToFilenamesTable() InodeToFilenamesTable
func (*FileSystem) Listf ¶
func (fs *FileSystem) Listf(w io.Writer, listSelector ListSelector, filter *filter.Filter) error
func (*FileSystem) NumComputedRegularInodes ¶
func (fs *FileSystem) NumComputedRegularInodes() uint64
func (*FileSystem) RebuildInodePointers ¶
func (fs *FileSystem) RebuildInodePointers() error
func (*FileSystem) String ¶
func (fs *FileSystem) String() string
type FilenameToInodeTable ¶
type GenericInode ¶
type HashToInodesTable ¶
type InodeTable ¶
type InodeTable map[uint64]GenericInode
type InodeToFilenamesTable ¶
type ListSelector ¶
type ListSelector uint8
type NumLinksTable ¶
type RegularInode ¶
type RegularInode struct { Mode FileMode Uid uint32 Gid uint32 MtimeNanoSeconds int32 MtimeSeconds int64 Size uint64 Hash hash.Hash }
func (*RegularInode) GetGid ¶
func (inode *RegularInode) GetGid() uint32
func (*RegularInode) GetUid ¶
func (inode *RegularInode) GetUid() uint32
func (*RegularInode) List ¶
func (inode *RegularInode) List(w io.Writer, name string, numLinksTable NumLinksTable, numLinks int, listSelector ListSelector, filter *filter.Filter) error
func (*RegularInode) SetGid ¶
func (inode *RegularInode) SetGid(gid uint32)
func (*RegularInode) SetUid ¶
func (inode *RegularInode) SetUid(uid uint32)
func (*RegularInode) WriteMetadata ¶
func (inode *RegularInode) WriteMetadata(name string) error
type SpecialInode ¶
type SpecialInode struct { Mode FileMode Uid uint32 Gid uint32 MtimeNanoSeconds int32 MtimeSeconds int64 Rdev uint64 }
func (*SpecialInode) GetGid ¶
func (inode *SpecialInode) GetGid() uint32
func (*SpecialInode) GetUid ¶
func (inode *SpecialInode) GetUid() uint32
func (*SpecialInode) List ¶
func (inode *SpecialInode) List(w io.Writer, name string, numLinksTable NumLinksTable, numLinks int, listSelector ListSelector, filter *filter.Filter) error
func (*SpecialInode) SetGid ¶
func (inode *SpecialInode) SetGid(gid uint32)
func (*SpecialInode) SetUid ¶
func (inode *SpecialInode) SetUid(uid uint32)
func (*SpecialInode) Write ¶
func (inode *SpecialInode) Write(name string) error
func (*SpecialInode) WriteMetadata ¶
func (inode *SpecialInode) WriteMetadata(name string) error
type SymlinkInode ¶
func (*SymlinkInode) GetGid ¶
func (inode *SymlinkInode) GetGid() uint32
func (*SymlinkInode) GetUid ¶
func (inode *SymlinkInode) GetUid() uint32
func (*SymlinkInode) List ¶
func (inode *SymlinkInode) List(w io.Writer, name string, numLinksTable NumLinksTable, numLinks int, listSelector ListSelector, filter *filter.Filter) error
func (*SymlinkInode) SetGid ¶
func (inode *SymlinkInode) SetGid(gid uint32)
func (*SymlinkInode) SetUid ¶
func (inode *SymlinkInode) SetUid(uid uint32)
func (*SymlinkInode) Write ¶
func (inode *SymlinkInode) Write(name string) error
func (*SymlinkInode) WriteMetadata ¶
func (inode *SymlinkInode) WriteMetadata(name string) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.