NewFileInput returns an Input based on a file system
(path string)
| 15 | |
| 16 | // NewFileInput returns an Input based on a file system |
| 17 | func NewFileInput(path string) (*FileInput, error) { |
| 18 | if _, err := os.Stat(path); err != nil { |
| 19 | return nil, err |
| 20 | } |
| 21 | |
| 22 | return &FileInput{ |
| 23 | FileSource: FileSource(path), |
| 24 | }, nil |
| 25 | } |
| 26 | |
| 27 | // Build creates an Entity by selecting the entity with the lowest type number and attaching higher objects recursively |
| 28 | func (d *FileInput) Build() (entity.Entity, error) { |