summaryrefslogtreecommitdiff
path: root/include/fud_csv.hpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2025-01-02 16:27:56 -0600
committerDominick Allen <djallen@librehumanitas.org>2025-01-02 16:27:56 -0600
commit8f12614f2da8221438a3807b1d234517650fbdb6 (patch)
tree18b4aebe99b1d64628546ca5811c10aeb139f1e7 /include/fud_csv.hpp
parent87071200872c2450c947047350132aee493033c1 (diff)
Clang tidy fixes.
Diffstat (limited to 'include/fud_csv.hpp')
-rw-r--r--include/fud_csv.hpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/include/fud_csv.hpp b/include/fud_csv.hpp
index 38b1b81..237c56f 100644
--- a/include/fud_csv.hpp
+++ b/include/fud_csv.hpp
@@ -25,8 +25,6 @@
#include "fud_utf8.hpp"
#include "fud_vector.hpp"
-#include <functional> // reference_wrapper
-
namespace fud {
using TextBuffer = Vector<std::byte>;
@@ -70,19 +68,26 @@ struct Csv {
static Csv make(Allocator& entryAllocator, Allocator& bufferAllocator);
/** Consume and return the CSV. */
- static FudStatus parseFromFilename(
+ static FudStatus parseFromFilenameUnbuffered(
+ Csv& csv,
+ StringView filename,
+ OpenFlags flags = OpenFlags{},
+ Option<int> dirFdOption = NullOpt,
+ size_t maxExtraAttempts = 0);
+
+ static FudStatus parseFromFilenameBuffered(
Csv& csv,
- Option<TextBuffer&&> bufferOption,
+ TextBuffer&& buffer,
StringView filename,
OpenFlags flags = OpenFlags{},
Option<int> dirFdOption = NullOpt,
- Option<size_t> maxExtraAttempts = NullOpt);
+ size_t maxExtraAttempts = 0);
// assumes file is at start
- static FudStatus parseFromUnbufferedFile(Csv& csv, RegularFile&& file, Option<size_t> maxExtraAttempts);
+ static FudStatus parseFromUnbufferedFile(Csv& csv, RegularFile&& file, size_t maxExtraAttempts);
// assumes file is at start
- static FudStatus parseFromBufferedFile(Csv& csv, BufferedRegularFile& file, Option<size_t> maxExtraAttempts);
+ static FudStatus parseFromBufferedFile(Csv& csv, BufferedRegularFile& file, size_t maxExtraAttempts);
};
} // namespace fud