|
| bool | openFile (const std::string &fileName, const bool &create=true, const int &multiple=0, const size_t &size=0, const mode_t &mode=0666) |
| | 打开文件 更多...
|
| |
| bool | closeFile (const bool &del=false) |
| | 关闭已打开了的文件 更多...
|
| |
| | ~File () |
| | 析构函数 更多...
|
| |
| bool | isOpen () |
| | 判断对象是否打开了文件 更多...
|
| |
| bool | isBinary () |
| | 判断对象是否以二进制模式打开文件 更多...
|
| |
| std::string | getFileName () |
| | 获取打开的文件名字 更多...
|
| |
| uint64_t | getFileLine () |
| | 获取打开的文件的行数 更多...
|
| |
| size_t | getFileSize () |
| | 获取二进制打开的文件的大小 更多...
|
| |
| size_t | getSize1 () |
| | 获取二进制打开的文件在内存中的大小 更多...
|
| |
| bool | lockMemory () |
| | 把数据从磁盘读入内存 更多...
|
| |
| bool | unlockMemory (const bool &rec=false) |
| | 把数据从内存写入磁盘 更多...
|
| |
| int | findC (const std::string &targetString, const int linePos=1) |
| | 查找行 更多...
|
| |
| bool | appendLineC (const std::string &data, const int &linePos=0) |
| | 插入行 更多...
|
| |
| bool | deleteLineC (const int &linePos=0) |
| | 删除行 更多...
|
| |
| bool | deleteAllC () |
| | 删除全部 更多...
|
| |
| bool | chgLineC (const std::string &data, const int &linePos=0) |
| | 修改行 更多...
|
| |
| bool | readLineC (std::string &data, const int linePos) |
| | 读取单行 更多...
|
| |
| std::string & | readC (std::string &data, const int &linePos, const int &num) |
| | 读取行 更多...
|
| |
| std::string & | readAllC (std::string &data) |
| | 读取全部 更多...
|
| |
| bool | readC (char *data, const size_t &pos, const size_t &size) |
| | 读取数据块 更多...
|
| |
| bool | writeC (const char *data, const size_t &pos, const size_t &size) |
| | 写数据块 更多...
|
| |
| void | formatC () |
| | 格式化数据 更多...
|
| |
| int | find (const std::string &targetString, const int linePos=1) |
| | 查找行 更多...
|
| |
| bool | appendLine (const std::string &data, const int &linePos=0) |
| | 插入行 更多...
|
| |
| bool | deleteLine (const int &linePos=0) |
| | 删除行 更多...
|
| |
| bool | deleteAll () |
| | 删除全部 更多...
|
| |
| bool | chgLine (const std::string &data, const int &linePos=0) |
| | 修改行 更多...
|
| |
| bool | readLine (std::string &data, const int linePos) |
| | 读取单行 更多...
|
| |
| std::string & | read (std::string &data, const int &linePos, const int &num) |
| | 读取行 更多...
|
| |
| std::string & | readAll (std::string &data) |
| | 读取全部 更多...
|
| |
| bool | read (char *data, const size_t &pos, const size_t &size) |
| | 读取数据块 更多...
|
| |
| bool | write (const char *data, const size_t &pos, const size_t &size) |
| | 写数据块 更多...
|
| |
| void | format () |
| | 格式化数据 更多...
|
| |
| std::mutex | che |
| |
| static std::mutex | l1 |
| |
static std::unordered_map
< std::string, FileThreadLock > | fl2 |
| |