stdioFile::Scan

Description

scan file from the beginning to look for line separation info

Syntax

int Scan( int nSize, stdioFileInfo * pfileInfo, BOOL bUnicode = false )

Parameters

nSize
[input] number of bytes to read
pfileInfo
[output] struct to receive file info
bUnicode
[input] file is unicode (wide characters) if true

Return

number of bytes actually read, should be same as nSize if not reaching end of the file

Examples

EX1

void stdioFile_Scan_ex1()
{
    string strFilename = GetAppPath() + "origin.ini";
    stdioFile ff;
    bool bRet = ff.Open(strFilename, file::modeRead);
    stdioFileInfo pfileInfo;
    int num = ff.Scan(1024, &pfileInfo);
    printf("read %d bytes\n", num);
}

Remark

See Also

header to Include

origin.h