File creates a pipe that reads from the file path.
(path string)
| 69 | |
| 70 | // File creates a pipe that reads from the file path. |
| 71 | func File(path string) *Pipe { |
| 72 | f, err := os.Open(path) |
| 73 | if err != nil { |
| 74 | return NewPipe().WithError(err) |
| 75 | } |
| 76 | return NewPipe().WithReader(f) |
| 77 | } |
| 78 | |
| 79 | // FindFiles creates a pipe listing all the files in the directory dir and its |
| 80 | // subdirectories recursively, one per line, like Unix find(1). |
searching dependent graphs…