KIO

filesystemfreespacejob.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 SPDX-FileCopyrightText: 2014 Mathias Tillman <master.homer@gmail.com>
6
7 SPDX-License-Identifier: LGPL-2.0-or-later
8*/
9
10#ifndef FILESYSTEMFREESPACEJOB_H
11#define FILESYSTEMFREESPACEJOB_H
12
13#include "kiocore_export.h"
14#include "simplejob.h"
15
16namespace KIO
17{
18class FileSystemFreeSpaceJobPrivate;
19/**
20 * @class KIO::FileSystemFreeSpaceJob filesystemfreespacejob.h <KIO/FileSystemFreeSpaceJob>
21 *
22 * A KIO job that retrieves the total and available size of a filesystem.
23 * @since 5.3
24 */
25class KIOCORE_EXPORT FileSystemFreeSpaceJob : public SimpleJob
26{
27 Q_OBJECT
28
29public:
30 ~FileSystemFreeSpaceJob() override;
31
32 /**
33 * Get total amount of space
34 * @since 6.0
35 */
36 KIO::filesize_t size() const;
37
38 /**
39 * Get available amount of space
40 * @since 6.0
41 */
42 KIO::filesize_t availableSize() const;
43
44public:
45 KIOCORE_NO_EXPORT explicit FileSystemFreeSpaceJob(FileSystemFreeSpaceJobPrivate &dd);
46
47private:
48 void slotFinished() override;
49 Q_DECLARE_PRIVATE(FileSystemFreeSpaceJob)
50};
51
52/**
53 * Get a filesystem's total and available space.
54 *
55 * @param url Url to the filesystem.
56 * @return the job handling the operation.
57 */
58KIOCORE_EXPORT FileSystemFreeSpaceJob *fileSystemFreeSpace(const QUrl &url);
59
60}
61
62#endif /* FILESYSTEMFREESPACEJOB_H */
A KIO job that retrieves the total and available size of a filesystem.
A simple job (one url and one command).
A namespace for KIO globals.
KIOCORE_EXPORT FileSystemFreeSpaceJob * fileSystemFreeSpace(const QUrl &url)
Get a filesystem's total and available space.
qulonglong filesize_t
64-bit file size
Definition global.h:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.