[Interest] equivalent of python glob

Jérôme Godbout godboutj at amotus.ca
Tue Aug 27 05:03:06 CEST 2019

I always use '/' for my path, I use to native path only when doing command or when needed. I also have toWindowsPath toUnixPath functions when doing cross platform request (non native call). The cleanPath() could be useful indeed, but if i remeber well I had some special edge case I wanted to cover. Anyway my unit test seem to indicate this work properly. If you come with a better solution, I could try it, I did not spend too much time on this.

From: Interest <interest-bounces at qt-project.org> on behalf of Hamish Moffatt <hamish at risingsoftware.com>
Sent: Monday, August 26, 2019 7:59 PM
To: interest at qt-project.org <interest at qt-project.org>
Subject: Re: [Interest] equivalent of python glob

On 27/8/19 12:33 am, Jérôme Godbout wrote:
> This is what I did for pathJoin
> const QString SEPARATOR("/");
> QString FileSystemUtil::pathJoin(const QStringList& paths)

Thanks. You could do that simpler with QDir::cleanPath() and
QDir::toNativeSeparators() I think (and not have to hardcode the separator).

I got my glob working with a mix of QDir, QFileInfo and QDirIterator. I
think it's a shame there isn't something simpler built in to C++ or Qt


Interest mailing list
Interest at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190827/5f37d143/attachment.html>

More information about the Interest mailing list