? ? * @param ? ? ? ? WORD wOpenModel?
? ? static const WORD MODEL_IN ? ? ? ? ?= std::ios::in; ? ? ? ? // 0x01, for reading the file does not exist, create (ifstream Open default)?
? ? static const WORD MODEL_OUT ? ? ? ? = std::ios::out; ? ? ? ?// 0x02, for writing, the file does not exist, to create, if the file already exists, clear the original content (ofstream default Open)?
? ? static const WORD MODEL_ATE ? ? ? ? = std::ios::ate; ? ? ? ?// 0x04, when the file is opened, the pointer in the file last. Can change the position of the pointer, often used in combination and in, out?
? ? static const WORD MODEL_APP ? ? ? ? = std::ios::app; ? ? ? ?// 0x08, for writing, the file does not exist, to create, to write new content after the original contents of the file if the file already exists, the total in the final pointer position?
? ? static const WORD MODEL_TRUNC ? ? ? = std::ios::trunc; ? ? ?// 0x10, length of the file read and write before first truncated to 0 (default)?
? ? static const WORD MODEL_NOCREATE ? ?= std::ios::_Nocreate; ?// 0x20, file does not exist error, often used in combination and in or app?
? ? static const WORD MODEL_NOREPLACE ? = std::ios::_Noreplace; // 0x40, file exists generates an error when used in combination, often and out?
? ? static const WORD MODEL_BINARY ? ? ?= std::ios::binary; ? ? // 0x80, binary format file?
? ? * @param ? ? ? ? WORD wAccess?
? ? static const WORD ACCESS_ORDINARY ? = 0; ? ? ? ? ? ? ? ? ? ?// 0: ordinary files, open access?
? ? static const WORD ACCESS_READONLY ? = 1; ? ? ? ? ? ? ? ? ? ?// 1: read-only file?
? ? static const WORD ACCESS_HIDDEN ? ? = 2; ? ? ? ? ? ? ? ? ? ?// 2: hidden file?
? ? static const WORD ACCESS_SYSTEM ? ? = 4; ? ? ? ? ? ? ? ? ? ?// 4: System Files?
? ? * @return?
? ? * @note?
? ? * @attention ? ?The default way to open a file to open the binary file reading and writing?
? ? ? ? ? ? ? ? ? ? The default file ordinary files, open access?
? ? */ ?
? ? AL_File(const NCHAR* cpFilePath, WORD wOpenModel = MODEL_IN|MODEL_OUT|MODEL_BINARY, WORD wOpenAccess = ACCESS_ORDINARY); ?
??
? ? /**?
? ? * Destruction?
? ? *?
? ? * @param?
? ? * @return?
? ? */ ?
? ? ~AL_File(VOID); ?
??
? ? ///////////////////////////////////Open the file/////////////////////////////////////// ?
? ? /**?
? ? * Open (Open the file)?
? ? *?
? ? * @param ? ? ? ? const NCHAR* cpFilePath?
? ? * @param ? ? ? ? WORD wOpenModel?
? ? ? ? ? ? ? ? ? ? ? ? static const WORD MODEL_IN ? ? ? ? ?= std::ios::in; ? ? ? ? // 0x01, for reading the file does not exist, create (ifstream Open default)?
? ? ? ? ? ? ? ? ? ? ? ? static const WORD MODEL_OUT ? ? ? ? = std::ios::out; ? ? ? ?// 0x02, for writing, the file does not exist, to create, if the file already exists, clear the original content (ofstream default Open)?
? ? ? ? ? ? ? ? ? ? ? ? static const WORD MODEL_ATE ? ? ? ? = std::ios::ate; ? ? ? ?// 0x04, when the file is opened, the pointer in the file last. Can change the position of the pointer, often used in combination and in, out?
? ? ? ? ? ? ? ? ? ? ? ? static const WORD MODEL_APP ? ? ? ? = std::ios::app; ? ? ? ?// 0x08, for writing, the file does not exist, to create, to write new content after the original contents of the file if the file already exists, the total in the final pointer position?
? ? ? ? ? ? ? ? ? ? ? ? static const WORD MODEL_TRUNC ? ? ? = std::ios::trunc; ? ? ?// 0x10, length of the file read and write before first truncated to 0 (default)?
? ? ? ? ? ? ? ? ? ? ? ? static const WORD MODEL_NOCREATE ? ?= std::ios::_Nocreate; ?// 0x20, file does not exist error, often used in combination and in or app?
? ? ? ? ? ? ? ? ? ? ? ? static const WOR