func readSector(f modules.File, sectorIndex uint32) ([]byte, error) {
	b := make([]byte, modules.SectorSize)
	_, err := f.ReadAt(b, int64(uint64(sectorIndex)*modules.SectorSize))
	if err != nil {
		return nil, build.ExtendErr("unable to read within storage folder", err)
	}
	return b, nil
}
readSector will read the sector in the file, starting from the provided
location.
package contractmanager
import (
	"encoding/binary"
	"errors"
	"sync"
	"sync/atomic"
	"github.com/NebulousLabs/Sia/build"
	"github.com/NebulousLabs/Sia/crypto"
	"github.com/NebulousLabs/Sia/modules"
)
var (
	errDiskTrouble = errors.New("host unable to add sector despite having the storage capacity to do so")
	errInsufficientStorageForSector = errors.New("not enough storage remaining to accept sector")
	errMaxVirtualSectors = errors.New("sector collides with a physical sector that already has the maximum allowed number of virtual sectors")
	ErrSectorNotFound = errors.New("could not find the desired sector")
)
type (
	sectorID [12]byte
	sectorLocation struct {
		index uint32
		storageFolder uint16
		count uint16
	}
	sectorLock struct {
		waiting int
		mu      sync.Mutex
	}
)