[Interest] QFile/QDir: force move mode only?

Jason H jhihn at gmx.com
Tue May 14 15:47:39 CEST 2019


I'd rather static bool QFile::isAtomicRename(const QString &source, cont QString &dest);
So that the software can plan accordingly. Blindly executing won't allow the software to accomodate non-atomic renames (i.e. Display an alternate UI). It would also be nice if there was an atomic-esque non-atomic rename, that would be a copy to the target FS and then atomic rename.


> Sent: Monday, May 13, 2019 at 10:11 PM
> From: "d3fault" <d3faultdotxbe at gmail.com>
> To: interest at qt-project.org
> Subject: Re: [Interest] QFile/QDir: force move mode only?
>
> On 5/13/19, Bernhard Lindner <private at bernhard-lindner.de> wrote:
> >> QFile::rename should rename always or fail! It should never do
> >> completely different operation - copy!
> >
> > I agree.
> >
>
> Adding a non-copying rename method to QFile/etc seems justified. Maybe
> call it: fastRename, tryRename, or atomicRename?
>
> d3fault
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
>



More information about the Interest mailing list