RESTinio
Loading...
Searching...
No Matches
Namespaces
sendfile_defs_posix.hpp File Reference
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <iostream>

Go to the source code of this file.

Namespaces

namespace  restinio
 

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.