File indexing completed on 2024-05-19 03:56:20

0001 /*
0002     This file is part of the KDE libraries
0003 
0004     SPDX-FileCopyrightText: 2011 David Faure <faure@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only
0007 */
0008 
0009 #ifndef KFILESYSTEMTYPE_P_H
0010 #define KFILESYSTEMTYPE_P_H
0011 
0012 #include <kcoreaddons_export.h>
0013 
0014 #include <QString>
0015 
0016 /**
0017  * @namespace KFileSystemType
0018  * Provides utility functions for the type of file systems.
0019  */
0020 namespace KFileSystemType
0021 {
0022 enum Type {
0023     Unknown,
0024     Nfs, ///< NFS or other full-featured networked filesystems (autofs, subfs, cachefs, sshfs)
0025     Smb, ///< SMB/CIFS mount (networked but with some FAT-like behavior)
0026     Fat, ///< FAT or similar (msdos, FAT, VFAT)
0027     Ramfs, ///< RAMDISK mount
0028     Other, ///< Ext3, Ext4, ReiserFs, and so on. "Normal" local filesystems.
0029     Ntfs, ///< NTFS filesystem @since 5.85
0030     Exfat, ///< ExFat filesystem @since 5.86
0031     /**
0032      * FUSE (Filesystem in USErspace), this is used for a variety of underlying
0033      * filesystems.
0034      *
0035      * @since 5.100
0036      */
0037     Fuse,
0038 };
0039 
0040 /**
0041  * For a given @p path, returns the filesystem type, one of @ref KFileSystemType::Type
0042  * values. If the type can't be determined, @c KFileSystemType::Unknown is returned.
0043  *
0044  * @since 5.0
0045  */
0046 KCOREADDONS_EXPORT Type fileSystemType(const QString &path);
0047 
0048 /**
0049  * Returns the possibly translated name of a filesystem corresponding to a
0050  * value from @ref KFileSystemType::Type.
0051  *
0052  * @since 5.86
0053  */
0054 KCOREADDONS_EXPORT QString fileSystemName(KFileSystemType::Type type);
0055 }
0056 
0057 #endif