KIO

mkdirjob.h
1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2000 Stephan Kulow <coolo@kde.org>
4 SPDX-FileCopyrightText: 2000-2009 David Faure <faure@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef MKDIRJOB_H
10#define MKDIRJOB_H
11
12#include "kiocore_export.h"
13#include "simplejob.h"
14
15namespace KIO
16{
17class MkdirJobPrivate;
18/**
19 * @class KIO::MkdirJob mkdirjob.h <KIO/MkdirJob>
20 *
21 * A KIO job that creates a directory
22 * @see KIO::mkdir()
23 */
24class KIOCORE_EXPORT MkdirJob : public SimpleJob
25{
26 Q_OBJECT
27
28public:
29 ~MkdirJob() override;
30
31Q_SIGNALS:
32 /**
33 * Signals a redirection.
34 * Use to update the URL shown to the user.
35 * The redirection itself is handled internally.
36 * @param job the job that is redirected
37 * @param url the new url
38 */
39 void redirection(KIO::Job *job, const QUrl &url);
40
41 /**
42 * Signals a permanent redirection.
43 * The redirection itself is handled internally.
44 * @param job the job that is redirected
45 * @param fromUrl the original URL
46 * @param toUrl the new URL
47 */
48 void permanentRedirection(KIO::Job *job, const QUrl &fromUrl, const QUrl &toUrl);
49
50protected Q_SLOTS:
51 void slotFinished() override;
52
53protected:
54 KIOCORE_NO_EXPORT explicit MkdirJob(MkdirJobPrivate &dd);
55
56private:
57 Q_DECLARE_PRIVATE(MkdirJob)
58};
59
60/**
61 * Creates a single directory.
62 *
63 * @param url The URL of the directory to create.
64 * @param permissions The permissions to set after creating the
65 * directory (unix-style), -1 for default permissions.
66 * @return A pointer to the job handling the operation.
67 */
68KIOCORE_EXPORT MkdirJob *mkdir(const QUrl &url, int permissions = -1);
69
70}
71
72#endif /* MKDIRJOB_H */
The base class for all jobs.
A KIO job that creates a directory.
void redirection(KIO::Job *job, const QUrl &url)
Signals a redirection.
void permanentRedirection(KIO::Job *job, const QUrl &fromUrl, const QUrl &toUrl)
Signals a permanent redirection.
A simple job (one url and one command).
A namespace for KIO globals.
KIOCORE_EXPORT MkdirJob * mkdir(const QUrl &url, int permissions=-1)
Creates a single directory.
Definition mkdirjob.cpp:110
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:04:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.