MySQL 9.0.0
Source Code Documentation
file.h File Reference
#include <array>
#include <system_error>
#include <fcntl.h>
#include <unistd.h>
#include "mysql/harness/stdx/expected.h"

Go to the source code of this file.

Classes

class  net::impl::file::file_control_option< Name, Arg >
 
class  net::impl::file::file_control_option< Name, void >
 

Namespaces

namespace  net
 
namespace  net::impl
 
namespace  net::impl::file
 

Typedefs

using net::impl::file::file_handle_type = int
 
using net::impl::file::dup_fd = file_control_option< F_DUPFD, int >
 
using net::impl::file::dup_fd_cloexec = file_control_option< F_DUPFD_CLOEXEC, int >
 
using net::impl::file::get_file_flags = file_control_option< F_GETFD, void >
 
using net::impl::file::set_file_flags = file_control_option< F_SETFD, int >
 
using net::impl::file::get_file_status = file_control_option< F_GETFL, void >
 
using net::impl::file::set_file_status = file_control_option< F_SETFL, int >
 
using net::impl::file::get_own = file_control_option< F_GETOWN, void >
 
using net::impl::file::set_own = file_control_option< F_SETOWN, int >
 

Functions

std::error_code net::impl::file::last_error_code ()
 
template<class FileControlOption >
stdx::expected< int, std::error_code > net::impl::file::fcntl (file_handle_type fd, const FileControlOption &cmd)
 
stdx::expected< std::pair< file_handle_type, file_handle_type >, std::error_code > net::impl::file::pipe (int flags=0)
 create pipe. More...
 
stdx::expected< size_t, std::error_code > net::impl::file::write (file_handle_type handle, const void *buf, size_t buf_len)
 write a buffer to a file handle. More...
 
stdx::expected< size_t, std::error_code > net::impl::file::read (file_handle_type handle, void *buf, size_t buf_len)
 read from file handle into a buffer. More...
 
stdx::expected< void, std::error_code > net::impl::file::close (file_handle_type native_handle)
 close file handle. More...
 

Variables

constexpr file_handle_type net::impl::file::kInvalidHandle {-1}