file_stream::open_istream 方法
開啟表示指定檔案的新輸入資料流。 檔案應該已經存在於磁碟上,否則會擲回例外狀況。
static pplx::task<streams::basic_istream<_CharType>> open_istream(
const utility::string_t &file_name,
std::ios_base::openmode mode = std::ios_base::in,
#ifdef _MS_WINDOWS int prot = (int) std::ios_base::_Openprot #else int prot = 0 #endif
);
static pplx::task<streams::basic_istream<_CharType>> open_istream(
::Windows::Storage::StorageFile^ file,
std::ios_base::openmode mode = std::ios_base::in
);
參數
file_name
檔案名稱mode
檔案的開啟模式prot
檔案保護模式file
表示檔案的 StorageFile 參考
傳回值
task,其將傳回在完成時開啟的輸入資料流。
需求
**標頭:**filestream.h
**命名空間:**concurrency::streams