func (m FleetFileManager) WriteQueues(queues *map[string]*InputCorpus) error {
	for fuzzerId, queue := range *queues {
		if err := m.MkQueueDir(fuzzerId); err != nil {
			return err
		}
		if err := m.aflFileManager(fuzzerId).WriteQueue(queue); err != nil {
			return err
		}
	}
	return nil
}
WriteQueues writes all queues in the given `queues` map to disk. `queues` is of
the form fuzzerId => *InputCorpus. This method is used by the server to persist
to disk queues that are reported to it by clients.
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)
}
func (m FleetFileManager) WriteTopLevelInput(input *Input) error {
	return WriteInputToFile(input, m.TopLevelInputDir())
}
func (m FleetFileManager) MkAllOutputDirs(fuzzerId string) error {
	return m.aflFileManager(fuzzerId).MkAllOutputDirs()
}
func (m FleetFileManager) MkQueueDir(fuzzerId string) error {
	return m.aflFileManager(fuzzerId).MkQueueDir()
}
func (m FleetFileManager) MkCrashesDir(fuzzerId string) error {
	return m.aflFileManager(fuzzerId).MkCrashesDir()
}