in azkustoingest/streaming.go [93:125]
func prepFileAndProps(fPath string, props *properties.All, options []FileOption, client ClientScope) (*os.File, error, bool) {
var err error
for _, option := range options {
err := option.Run(props, client, FromFile)
if err != nil {
return nil, err, true
}
}
local, err := queued.IsLocalPath(fPath)
if err != nil {
return nil, err, local
}
if !local {
return nil, nil, false
}
props.Source.OriginalSource = fPath
compression := utils.CompressionDiscovery(fPath)
err = queued.CompleteFormatFromFileName(props, fPath)
if err != nil {
return nil, err, true
}
props.Source.DontCompress = !queued.ShouldCompress(props, compression)
file, err := os.Open(fPath)
if err != nil {
return nil, err, true
}
return file, nil, true
}