github.com/Cloud-Foundations/Dominator@v0.3.4/imageunpacker/unpacker/getFileSystem.go (about)

     1  package unpacker
     2  
     3  import (
     4  	"errors"
     5  
     6  	"github.com/Cloud-Foundations/Dominator/lib/filesystem"
     7  )
     8  
     9  func (u *Unpacker) getFileSystem(streamName string) (
    10  	*filesystem.FileSystem, error) {
    11  	u.rwMutex.RLock()
    12  	defer u.rwMutex.RUnlock()
    13  	streamInfo := u.getStream(streamName)
    14  	if streamInfo == nil {
    15  		return nil, errors.New("unknown stream")
    16  	}
    17  	return streamInfo.scannedFS, nil
    18  }