Baloo

file.h
1 /*
2  This file is part of the KDE Baloo Project
3  SPDX-FileCopyrightText: 2013 Vishesh Handa <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7 
8 #ifndef BALOO_FILE_H
9 #define BALOO_FILE_H
10 
11 #include "core_export.h"
12 #include <KFileMetaData/Properties>
13 
14 namespace Baloo {
15 
16 /**
17  * @class File file.h <Baloo/File>
18  *
19  * @short Provides access to all File Metadata
20  *
21  * The File class acts as a temporary container for all the file metadata.
22  */
23 class BALOO_CORE_EXPORT File
24 {
25 public:
26  File();
27  File(const File& f);
28 
29  /**
30  * Constructor
31  *
32  * \p url the local url of the file
33  */
34  File(const QString& url);
35  ~File();
36 
37  const File& operator =(const File& f);
38 
39  /**
40  * The local url of the file
41  */
42  QString path() const;
43 
44  /**
45  * Gives a variant map of the properties that have been extracted
46  * from the file by the indexer
47  */
48 #if BALOO_CORE_BUILD_DEPRECATED_SINCE(5, 91)
49  KFileMetaData::PropertyMap properties() const;
50 #else
51  KFileMetaData::PropertyMultiMap properties() const;
52 #endif
53  QVariant property(KFileMetaData::Property::Property property) const;
54 
55  // FIXME: More descriptive error?
56  bool load();
57  bool load(const QString& url);
58 
59 private:
60  class Private;
61  Private* d;
62 };
63 
64 }
65 
66 #endif // BALOO_FILE_H
Provides access to all File Metadata.
Definition: file.h:23
Implements storage for docIds without any associated data Instantiated for:
Definition: coding.cpp:11
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Nov 29 2023 03:56:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.