C++ Rest SDK
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Static Public Member Functions | List of all members
Concurrency::streams::file_stream< _CharType > Class Template Reference

File stream class containing factory functions for file streams. More...

#include <filestream.h>

Static Public Member Functions

static pplx::task< streams::basic_istream< _CharType > > open_istream (const utility::string_t &file_name, std::ios_base::openmode mode=std::ios_base::in, int prot=0)
 Open a new input stream representing the given file. The file should already exist on disk, or an exception will be thrown. More...
 
static pplx::task< streams::basic_ostream< _CharType > > open_ostream (const utility::string_t &file_name, std::ios_base::openmode mode=std::ios_base::out, int prot=0)
 Open a new ouput stream representing the given file. If the file does not exist, it will be create unless the folder or directory where it is to be found also does not exist. More...
 

Detailed Description

template<typename _CharType>
class Concurrency::streams::file_stream< _CharType >

File stream class containing factory functions for file streams.

Template Parameters
_CharTypeThe data type of the basic element of the file_stream.

Member Function Documentation

template<typename _CharType >
static pplx::task<streams::basic_istream<_CharType> > Concurrency::streams::file_stream< _CharType >::open_istream ( const utility::string_t &  file_name,
std::ios_base::openmode  mode = std::ios_base::in,
int  prot = 0 
)
inlinestatic

Open a new input stream representing the given file. The file should already exist on disk, or an exception will be thrown.

Parameters
file_nameThe name of the file
modeThe opening mode of the file
protThe file protection mode
Returns
A task that returns an opened input stream on completion.
template<typename _CharType >
static pplx::task<streams::basic_ostream<_CharType> > Concurrency::streams::file_stream< _CharType >::open_ostream ( const utility::string_t &  file_name,
std::ios_base::openmode  mode = std::ios_base::out,
int  prot = 0 
)
inlinestatic

Open a new ouput stream representing the given file. If the file does not exist, it will be create unless the folder or directory where it is to be found also does not exist.

Parameters
file_nameThe name of the file
modeThe opening mode of the file
protThe file protection mode
Returns
A task that returns an opened output stream on completion.

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