func (m FleetFileManager) WriteTopLevelInput(input *Input) error {
	return WriteInputToFile(input, m.TopLevelInputDir())
}
WriteTopLevelInput writes the given input to the fleet's input dir
package types
import (
	"io/ioutil"
	"os"
	"path/filepath"
)
type FleetFileManager struct {
	Basedir string
}
func (m FleetFileManager) WriteOutput(fuzzerId string, output *AflOutput) error {
	return m.aflFileManager(fuzzerId).WriteOutput(output)
}
func (m FleetFileManager) ReadOutputs() (map[string]*AflOutput, error) {
	fuzzerIds, err := m.FuzzerIds()
	if err != nil {
		return nil, err
	}
	outputs := make(map[string]*AflOutput)
	for _, fuzzerId := range fuzzerIds {
		output, err := m.aflFileManager(fuzzerId).ReadOutput()
		if err != nil {
			return nil, err
		}
		outputs[fuzzerId] = &output
	}
	return outputs, nil
}
func (m FleetFileManager) FuzzerIds() ([]string, error) {
	fileInfos, err := ioutil.ReadDir(m.TopLevelOutputDir())
	if err != nil {
		return nil, err
	}
	ids := make([]string, 0)
	for _, fileInfo := range fileInfos {
		if fileInfo.IsDir() {
			fuzzerId := filepath.Base(fileInfo.Name())
			ids = append(ids, fuzzerId)
		}
	}
	return ids, nil
}
func (m FleetFileManager) ReadInputs() (*InputCorpus, error) {
	inputDir := filepath.Join(m.Basedir, "input")
	return ReadInputCorpus(inputDir)
}
func (m FleetFileManager) TopLevelOutputDir() string {
	return filepath.Join(m.Basedir, "output")
}
func (m FleetFileManager) MkTopLevelOutputDir() error {
	return os.MkdirAll(m.TopLevelOutputDir(), 0755)
}
func (m FleetFileManager) TopLevelInputDir() string {
	return filepath.Join(m.Basedir, "input")
}
func (m FleetFileManager) MkTopLevelInputDir() error {
	return os.MkdirAll(m.TopLevelInputDir(), 0755)
}