예제 #1
0
void NativePath::createPath(NativePath const &nativePath)
{
    NativePath parentPath = nativePath.fileNamePath();
    if (!parentPath.isEmpty() && !exists(parentPath))
    {
        createPath(parentPath);
    }

    QDir::current().mkdir(nativePath);

    if (!exists(nativePath))
    {
        /// @throw CreateDirError Failed to create directory @a nativePath.
        throw CreateDirError("NativePath::createPath", "Could not create: " + nativePath);
    }
}