Qt-interest Archive, March 2008
changing files last modified time
Message 1 in thread
I want to last modified time of file with qt. I know we can get last
modified time of file with QFileInfo . How can i set ? Is it possible in any
Qt version ?
Ramazan
--
[ signature omitted ]
Message 2 in thread
"Ramazan" <ramazangirgin@xxxxxxxxx> wrote in message
news:fro7jt$b54$1@xxxxxxxxxxxxxxxx
> I want to last modified time of file with qt. I know we can get last
> modified time of file with QFileInfo . How can i set ? Is it possible in
> any Qt version ?
Hi,
Not sure of using QFileInfo (my guess: no), but why not just touch the files
yourself? Opening them for writing and closing them ought to do the job,
though on *nix you would of course use `touch` on the file.
HTH,
André
--
[ signature omitted ]
Message 3 in thread
I wouldn't recommend 'touch' as it's rather *nix-specific.
So if you want to set file modification time to current system time, open
and close the file. Else you have to use system's native functions as this
feature isn't supported by the QFSFileEngine class.
On Tue, 18 Mar 2008 16:49:07 +0300, André Somers <andre@xxxxxxxxxxxxxxxx>
wrote:
> "Ramazan" <ramazangirgin@xxxxxxxxx> wrote in message
> news:fro7jt$b54$1@xxxxxxxxxxxxxxxx
>> I want to last modified time of file with qt. I know we can get last
>> modified time of file with QFileInfo . How can i set ? Is it possible
>> in any Qt version ?
>
> Hi,
>
> Not sure of using QFileInfo (my guess: no), but why not just touch the
> files yourself? Opening them for writing and closing them ought to do
> the job, though on *nix you would of course use `touch` on the file.
>
> HTH,
>
> André
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]