| 1 | // Copyright (c) 2019-2024 Alexander Medvednikov. All rights reserved. |
| 2 | // Use of this source code is governed by an MIT license |
| 3 | // that can be found in the LICENSE file. |
| 4 | module csv |
| 5 | |
| 6 | import os |
| 7 | |
| 8 | // new_reader_from_file create a csv reader from a file |
| 9 | pub fn new_reader_from_file(csv_file_path string, config ReaderConfig) !&Reader { |
| 10 | csv_file_content := os.read_file(csv_file_path)! |
| 11 | return new_reader(csv_file_content, config) |
| 12 | } |
| 13 |