5 文件处理函数

1 打开文件

            file fileOpen(string filename, string option)
        

option:文件打开类型“r”-读; “w”-写

2 关闭文件

            void fileClose(file fp)
        

3 将文件指针移动到指定位置

            bool fileSeekLine(file fp, long pos)
        

4 获取字符串行数

            long fileGetLines(file fp)
        

5 按分隔符读取字符串

            bool fileReadString(file fp, string& word, string division)
        

6 读取一行的字符串

            bool fileReadLine(file fp, string& line)
        

7 写入一行字符串

            bool fileWriteLine(file fp, string lingString)
        

8 获取文件大小

            long fileGetLength(file fp)
        

9 读取指定长度的数据

            bool fileRead(file fp, dword buffer, long len)
        

10 写入指定长度的数据

            bool fileWrite(file fp, dword buffer, long len)