// FindFiles files FileInfos on an Agent
FindFiles files FileInfos on an Agent
// FindFiles files FileInfos on an Agent
func FindFiles(profile *config.Profile, criteria Criteria) (Messages, error) {
	msgs, err := FindAgents(profile, Criteria{AgentID: criteria.AgentID})
	if err != nil {
		return nil, err
	}
	agnt, err := AsAgent(msgs.FindOne())
	if err != nil {
		return nil, err
	}
	return FromAgent(helper.NewAgentCaller(profile, agnt).CallAgent(agent.ListFiles(criteria.FilePath)))
}
func FindFiles ( profile * config . Profile , criteria Criteria ) ( Messages , error ) { msgs , err := FindAgents ( profile , Criteria { AgentID : criteria . AgentID } ) if err != nil { return nil , err } agnt , err := AsAgent ( msgs . FindOne ( ) ) if err != nil { return nil , err } return FromAgent ( helper . NewAgentCaller ( profile , agnt ) . CallAgent ( agent . ListFiles ( criteria . FilePath ) ) ) }
FindFiles files FileInfos on an Agent
FindFiles files FileInfos on an Agent
// Resolve the AgentInfo