53 return file_descriptor;
57template <
typename META >
66 if( 0 == std::fseek( fd , 0 ,
SEEK_END ) )
68 const auto end_pos = std::ftell( fd );
88 return META{ fsize, std::chrono::system_clock::now() };
Exception class for all exceptions thrown by RESTinio.
#define RESTINIO_FMT_FORMAT_STRING(s)
constexpr file_descriptor_t null_file_descriptor()
Get file descriptor which stands for null.
std::uint64_t file_size_t
void close_file(file_descriptor_t fd)
Close file by its descriptor.
std::int64_t file_offset_t
std::FILE * file_descriptor_t
file_descriptor_t open_file(const char *file_path)
Open file.
META get_file_meta(file_descriptor_t fd)
Get file size.