Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
fmt::File Class Reference

#include <posix.h>

Classes

struct  Proxy
 

Public Types

enum  { RDONLY = FMT_POSIX(O_RDONLY), WRONLY = FMT_POSIX(O_WRONLY), RDWR = FMT_POSIX(O_RDWR) }
 

Public Member Functions

 File () FMT_NOEXCEPT
 
 File (CStringRef path, int oflag)
 
 File (Proxy p) FMT_NOEXCEPT
 
 File (File &other) FMT_NOEXCEPT
 
Fileoperator= (Proxy p)
 
Fileoperator= (File &other)
 
 operator Proxy () FMT_NOEXCEPT
 
 ~File () FMT_NOEXCEPT
 
int descriptor () const FMT_NOEXCEPT
 
void close ()
 
LongLong size () const
 
std::size_t read (void *buffer, std::size_t count)
 
std::size_t write (const void *buffer, std::size_t count)
 
void dup2 (int fd)
 
void dup2 (int fd, ErrorCode &ec) FMT_NOEXCEPT
 
BufferedFile fdopen (const char *mode)
 

Static Public Member Functions

static File dup (int fd)
 
static void pipe (File &read_end, File &write_end)
 

Private Member Functions

 File (int fd)
 

Private Attributes

int fd_
 

Member Enumeration Documentation

anonymous enum
Enumerator
RDONLY 
WRONLY 
RDWR 

Constructor & Destructor Documentation

fmt::File::File ( int  fd)
inlineexplicitprivate
fmt::File::File ( )
inline
fmt::File::File ( fmt::CStringRef  path,
int  oflag 
)
fmt::File::File ( Proxy  p)
inline
fmt::File::File ( File other)
inline
fmt::File::~File ( )

Member Function Documentation

void fmt::File::close ( )
int fmt::File::descriptor ( ) const
inline

References fd_.

fmt::File fmt::File::dup ( int  fd)
static

References FMT_POSIX_CALL, and FMT_THROW.

void fmt::File::dup2 ( int  fd)
void fmt::File::dup2 ( int  fd,
ErrorCode ec 
)
fmt::BufferedFile fmt::File::fdopen ( const char *  mode)
fmt::File::operator Proxy ( )
inline
File& fmt::File::operator= ( Proxy  p)
inline

References close(), fmt::File::Proxy::fd, and fd_.

File& fmt::File::operator= ( File other)
inline

References close(), and fd_.

void fmt::File::pipe ( File read_end,
File write_end 
)
static
std::size_t fmt::File::read ( void *  buffer,
std::size_t  count 
)
fmt::LongLong fmt::File::size ( ) const
std::size_t fmt::File::write ( const void *  buffer,
std::size_t  count 
)

Member Data Documentation

int fmt::File::fd_
private

The documentation for this class was generated from the following files: