file_buffer::open 方法

打开表示特定文件的新流缓冲区。

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
);

参数

  • file_name
    文件的名称

  • mode
    文件的打开模式

  • prot
    文件保护模式

  • file
    StorageFile 实例

返回值

task 在完成时返回已打开的流缓冲区。

要求

**标头:**filestream.h

**命名空间:**concurrency::streams

请参见

参考

file_buffer 类