[Interest] QFileDevice::fileTime and QFileDevice::setFielTime

Scott Bloom scott at towel42.com
Thu Nov 11 02:17:50 CET 2021


I have a non qfile based solution working. The problem i see, is the qt file device is too file centric for this bit of functionality.  IMO it should be in qfileinfo, or on qdir as well as qfile



~~Scott


-------- Original message --------
From: Thiago Macieira <thiago.macieira at intel.com>
Date: 11/10/21 5:06 PM (GMT-08:00)
To: interest at qt-project.org
Cc: Scott Bloom <scott at towel42.com>
Subject: Re: [Interest] QFileDevice::fileTime and QFileDevice::setFielTime

On Wednesday, 10 November 2021 14:33:05 PST Scott Bloom wrote:
> Is there anyway (besides fixing QFSFileEngine::setFileTime) to support
> setting the time stamp on a directory?

That won't work either. Both QFSFileEngine and QFileSystemEngine operate on an
open file handle.

You may be able to trick Qt by opening the directory with _wopen and giving
QFile that handle. You can't read or write but it might work.

I'm assuming you only care about Windows. You can't set the file's birth time
on Linux: the only way to do that is to delete the file and create another.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20211111/a676cc48/attachment.html>


More information about the Interest mailing list