NewBufferFromFile opens a new buffer using the given path It will also automatically handle `~`, and line/column with filename:l:c It will return an empty buffer if the path does not exist and an error if the file is a directory
(path string, btype BufType)
| 335 | // It will return an empty buffer if the path does not exist |
| 336 | // and an error if the file is a directory |
| 337 | func NewBufferFromFile(path string, btype BufType) (*Buffer, error) { |
| 338 | return NewBufferFromFileWithCommand(path, btype, emptyCommand) |
| 339 | } |
| 340 | |
| 341 | // NewBufferFromStringWithCommand creates a new buffer containing the given string |
| 342 | // with a cursor loc and a search text |
no test coverage detected