KIO

mkdirjob.h
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2000 Stephan Kulow <[email protected]>
4  SPDX-FileCopyrightText: 2000-2009 David Faure <[email protected]>
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 
15 namespace KIO
16 {
17 class MkdirJobPrivate;
18 /**
19  * @class KIO::MkdirJob mkdirjob.h <KIO/MkdirJob>
20  *
21  * A KIO job that creates a directory
22  * @see KIO::mkdir()
23  */
24 class KIOCORE_EXPORT MkdirJob : public SimpleJob
25 {
26  Q_OBJECT
27 
28 public:
29  ~MkdirJob() override;
30 
31 Q_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 
50 protected Q_SLOTS:
51  void slotFinished() override;
52 
53 protected:
54  KIOCORE_NO_EXPORT explicit MkdirJob(MkdirJobPrivate &dd);
55 
56 private:
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  */
68 KIOCORE_EXPORT MkdirJob *mkdir(const QUrl &url, int permissions = -1);
69 
70 }
71 
72 #endif /* MKDIRJOB_H */
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-2023 The KDE developers.
Generated on Sun Oct 1 2023 03:50:06 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.