共用方式為


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 類別