const QByteArray searchqstring= "*********";
QFile file("/opt/***");
file.open(QFile::ReadOnly);
while(1)
{
QByteArray array = file.read(1024);
file.seek(file.pos()-6);
if(array.contains(searchqstring))
{
qDebug()<<"..I find it...";
}
if(array.length()<1024)
{
qDebug()<<"..can not fine...";
return ;
}
}
时间: 2024-10-08 17:57:03