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 | * Provides utility functions for the type of file systems. |
19 | */ |
20 | namespace KFileSystemType |
21 | { |
22 | enum Type { |
23 | Unknown, |
24 | Nfs, ///< NFS or other full-featured networked filesystems (autofs, subfs, cachefs, sshfs) |
25 | Smb, ///< SMB/CIFS mount (networked but with some FAT-like behavior) |
26 | Fat, ///< FAT or similar (msdos, FAT, VFAT) |
27 | Ramfs, ///< RAMDISK mount |
28 | Other, ///< Ext3, Ext4, ReiserFs, and so on. "Normal" local filesystems. |
29 | Ntfs, ///< NTFS filesystem @since 5.85 |
30 | Exfat, ///< ExFat filesystem @since 5.86 |
31 | /** |
32 | * FUSE (Filesystem in USErspace), this is used for a variety of underlying |
33 | * filesystems. |
34 | * |
35 | * @since 5.100 |
36 | */ |
37 | Fuse, |
38 | }; |
39 | |
40 | /** |
41 | * For a given @p path, returns the filesystem type, one of @ref KFileSystemType::Type |
42 | * values. If the type can't be determined, @c KFileSystemType::Unknown is returned. |
43 | * |
44 | * @since 5.0 |
45 | */ |
46 | KCOREADDONS_EXPORT Type fileSystemType(const QString &path); |
47 | |
48 | /** |
49 | * Returns the possibly translated name of a filesystem corresponding to a |
50 | * value from @ref KFileSystemType::Type. |
51 | * |
52 | * @since 5.86 |
53 | */ |
54 | KCOREADDONS_EXPORT QString fileSystemName(KFileSystemType::Type type); |
55 | } |
56 | |
57 | #endif |
58 | |