Compartilhar via


file_buffer::open Method

Open a new stream buffer representing the given file.

static pplx::task<streambuf<_CharType>> open(
   const utility::string_t &file_name,
   std::ios_base::openmode mode = std::ios_base::out,
   #ifdef _MS_WINDOWS int prot = _SH_DENYRD #else int prot = 0 #endif
);

static pplx::task<streambuf<_CharType>> open(
   ::Windows::Storage::StorageFile^ file,
   std::ios_base::openmode mode = std::ios_base::out
);

Parameters

  • file_name
    The name of the file

  • mode
    The opening mode of the file

  • prot
    The file protection mode

  • file
    The StorageFile instance

Return Value

A task that returns an opened stream buffer on completion.

Requirements

Header: filestream.h

Namespace: concurrency::streams

See Also

Reference

file_buffer Class