blob: e4d377363be321ee9bd68701f290c58ba404ede3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include "File.hpp"
#include <cstring>
#include <openvic-dataloader/detail/Utility.hpp>
#include <lexy/encoding.hpp>
using namespace ovdl;
File::File(const char* path) : _path(path) {}
const char* File::path() const noexcept {
return _path;
}
bool File::is_valid() const noexcept {
return _buffer.index() != 0 && !_buffer.valueless_by_exception() && visit_buffer([](auto&& buffer) { return buffer.data() != nullptr; });
}
|