RESTinio
Loading...
Searching...
No Matches
sendfile_defs_default.hpp File Reference
#include <cstdio>
#include <cerrno>
#include <stdio.h>

Go to the source code of this file.

Namespaces

namespace  restinio

Typedefs

Aliases for sendfile operation.
using restinio::file_descriptor_t = std::FILE*
using restinio::file_offset_t = std::int64_t
using restinio::file_size_t = std::uint64_t

Functions

File operations.

A minimal set of file operations.

Incapsulates details of native API for a set of file operations neccessary for sendfile_t class implementation.

constexpr file_descriptor_t restinio::null_file_descriptor ()
 Get file descriptor which stands for null.
file_descriptor_t restinio::open_file (const char *file_path)
 Open file.
file_descriptor_t restinio::open_file (const std::filesystem::path &file_path)
 Helper function that accepts std::filesystem::path.
template<typename META>
META restinio::get_file_meta (file_descriptor_t fd)
 Get file size.
void restinio::close_file (file_descriptor_t fd)
 Close file by its descriptor.