1/*
2 This file is part of the KDE libraries
3
4 SPDX-FileCopyrightText: 2011 David Faure <faure@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.1-only
7*/
8
9#ifndef KFILESYSTEMTYPE_P_H
10#define KFILESYSTEMTYPE_P_H
11
12#include <kcoreaddons_export.h>
13
14#include <QString>
15
16/*!
17 * \namespace KFileSystemType
18 * \inmodule KCoreAddons
19 * Provides utility functions for the type of file systems.
20 */
21namespace KFileSystemType
22{
23/*!
24 * \value Unknown Unknown
25 * \value Nfs NFS or other full-featured networked filesystems (autofs, subfs, cachefs, sshfs)
26 * \value Smb SMB/CIFS mount (networked but with some FAT-like behavior)
27 * \value Fat FAT or similar (msdos, FAT, VFAT)
28 * \value Ramfs RAMDISK mount
29 * \value Other Ext3, Ext4, ReiserFs, and so on. "Normal" local filesystems.
30 * \value [since 5.85] Ntfs NTFS filesystem
31 * \value [since 5.86] Exfat ExFat filesystem
32 * \value [since 5.100] Fuse (Filesystem in USErspace), this is used for a variety of underlying filesystems.
33 */
34enum Type {
35 Unknown,
36 Nfs,
37 Smb,
38 Fat,
39 Ramfs,
40 Other,
41 Ntfs,
42 Exfat,
43 Fuse,
44};
45
46/*!
47 * For a given \a path, returns the filesystem type, one of KFileSystemType::Type
48 * values. If the type can't be determined, KFileSystemType::Unknown is returned.
49 *
50 * \since 5.0
51 */
52KCOREADDONS_EXPORT Type fileSystemType(const QString &path);
53
54/*!
55 * Returns the possibly translated name of a filesystem corresponding to a
56 * value from KFileSystemType::Type.
57 *
58 * \since 5.86
59 */
60KCOREADDONS_EXPORT QString fileSystemName(KFileSystemType::Type type);
61}
62
63#endif
64

source code of kcoreaddons/src/lib/io/kfilesystemtype.h