Exemple #1
0
func (h *Harvester) getState() file.State {

	if h.config.InputType == config.StdinInputType {
		return file.State{}
	}

	// refreshes the values in State with the values from the harvester itself
	h.state.FileStateOS = file.GetOSState(h.state.Fileinfo)
	return h.state
}
Exemple #2
0
// refreshState refreshes the values in State with the values from the harvester itself
func (h *Harvester) refreshState() {
	h.State.Source = h.Path
	h.State.Offset = h.getOffset()
	h.State.FileStateOS = file.GetOSState(h.State.Fileinfo)
}