From kde-core-devel Sat Aug 08 17:35:59 2009 From: David Faure Date: Sat, 08 Aug 2009 17:35:59 +0000 To: kde-core-devel Subject: Re: Different ways to create a directory Message-Id: <200908081935.59147.faure () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=124976846115485 On Thursday 30 July 2009, Raphael Kubo da Costa wrote: > Currently, I can see that a directory can be created with > QDir::mkdir Local paths only > KIO::mkdir Network transparent, asynchronous > NetAccess::mkdir (a wrapper around KIO::mkdir for synchronous usage) Yep. So: Network transparent, synchronous > and KStandardDirs::makeDir. Local paths only, but also creates missing parent directories. So this one is more comparable to QDir::mkpath(). But it has support for setting the mode_t of the created directories, while QDir::mkpath() does not. > Is any of these frowned upon, and is any of them the most recommended? Depends on what you want to do exactly. > Aren't they just duplicating functionality available elsewhere? I don't think so. -- David Faure, faure@kde.org, sponsored by Qt Software @ Nokia to work on KDE, Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).