class KTempDir


Table of contents
Modules
kdecore Classes
All Classes
Module kdecore
Namespace global
Class KTempDir
Inherits

Create a unique directory for temporary use.

The KTempDir class creates a unique directory for temporary use.

This is especially useful if you need to create a directory in a world writable directory like /tmp without being vulnerable to so called symlink attacks.

KDE applications, however, shouldn't create files or directories in /tmp in the first place but use the "tmp" resource instead. The standard KTempDir constructor will do that by default.

To create a temporary directory that starts with a certain name in the "tmp" resource, one should use: KTempDir(locateLocal("tmp", prefix));

KTempDir does not create any missing directories, but locateLocal() does.

See also KStandardDirs

See also KTemporaryFile Author Joseph Wenninger



methods