Naahmi
11th July 2012, 11:08
Hello,
is there a way to check if the file is used by another process like soffice?
Under Windows it works perfect but under mac/linux is doesnt work. I think mac/linux doesn't make the file only readable.
My Testcase:
QString fileName = childElement.text();
fileName = QDir::tempPath() + "/" + fileName;
for(int i=0; i < 100; i++)
{
QFile file(fileName);
if(file.open(QIODevice::WriteOnly))
{
qDebug() << "JA";
} else {
qDebug() << "NEIN";
}
is there a way to check if the file is used by another process like soffice?
Under Windows it works perfect but under mac/linux is doesnt work. I think mac/linux doesn't make the file only readable.
My Testcase:
QString fileName = childElement.text();
fileName = QDir::tempPath() + "/" + fileName;
for(int i=0; i < 100; i++)
{
QFile file(fileName);
if(file.open(QIODevice::WriteOnly))
{
qDebug() << "JA";
} else {
qDebug() << "NEIN";
}