CFile::modeCreate 繼承
讓構造器建立一個新文件,若是那個文件已經存在,把那個文件的長度重設爲0進程
CFile::modeNoTruncate it
能夠同modeCreate. 一塊兒用,若是要建立的文件已經存在,並不把它長度設置爲0,於是這個文件獲取或者做爲一個新建文件或者做爲一個已存在文件打開。這個功能每每很好用,好比說,當你須要打開一個設置文件,可是你並不清楚這個文件是否已經存在。 io
CFile::modeRead sed
打開文件僅僅供讀file
CFile::modeReadWrite map
打開文件供讀寫二進制
CFile::modeWrite 文件
打開文件只供寫process
CFile::modeNoInherit
阻止這個文件被子進程繼承
CFile::shareDenyNone
打開這個文件同時容許其它進程讀寫這個文件。若是文件被其它進程以incompatibility模式打開,這是create操做會失敗。
CFile::shareDenyRead
打開文件拒絕其它任何進程讀這個文件。若是文件被其它進程用compatibility模式或者是讀方式打開,create操做失敗。
CFile::shareDenyWrite
打開文件拒絕其它任何進程寫這個文件。若是文件被其它進程用compatibility模式或者是寫方式打開,create操做失敗。
CFile::shareExclusive
以獨佔方式打開這個文件,不容許其它進程讀寫這個文件。 Construction fails if the file has been opened in any other mode for read or write access, even by the current process.
CFile::shareCompat
這個標誌在32位的MFC中無效。 This flag maps to CFile::shareExclusive when used in CFile::Open.
CFile::typeText
設置成對回車換行對有特殊處理的文本模式(僅用在派生類中)
CFile::typeBinary
設置二進制模式(僅用在派生類中)