v2 / vlib / encoding / csv / utils.v
12 lines · 10 sloc · 428 bytes · 43b8cc8ab7f2f1b4f772e96ed5980ceb2b3289b7
Raw
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.
4module csv
5
6import os
7
8// new_reader_from_file create a csv reader from a file
9pub 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