github.com/Cloud-Foundations/Dominator@v0.3.4/lib/filesystem/get.go (about)

     1  package filesystem
     2  
     3  import (
     4  	"github.com/Cloud-Foundations/Dominator/lib/hash"
     5  )
     6  
     7  func (fs *FileSystem) getObjects() map[hash.Hash]uint64 {
     8  	objects := make(map[hash.Hash]uint64)
     9  	for _, inode := range fs.InodeTable {
    10  		if inode, ok := inode.(*RegularInode); ok {
    11  			if inode.Size > 0 {
    12  				objects[inode.Hash] = inode.Size
    13  			}
    14  		}
    15  	}
    16  	return objects
    17  }