KFileSystemType Namespace

Header: #include <KFileSystemType>
CMake: find_package(KF6 REQUIRED COMPONENTS CoreAddons)
target_link_libraries(mytarget PRIVATE KF6::CoreAddons)

Types

enum Type { Unknown, Nfs, Smb, Fat, Ramfs, …, Fuse }

Functions

(since 5.86) QString fileSystemName(KFileSystemType::Type type)
(since 5.0) KFileSystemType::Type fileSystemType(const QString &path)

Detailed Description

Provides utility functions for the type of file systems.

Type Documentation

enum KFileSystemType::Type

ConstantValueDescription
KFileSystemType::Unknown0Unknown
KFileSystemType::Nfs1NFS or other full-featured networked filesystems (autofs, subfs, cachefs, sshfs)
KFileSystemType::Smb2SMB/CIFS mount (networked but with some FAT-like behavior)
KFileSystemType::Fat3FAT or similar (msdos, FAT, VFAT)
KFileSystemType::Ramfs4RAMDISK mount
KFileSystemType::Other5Ext3, Ext4, ReiserFs, and so on. "Normal" local filesystems.
KFileSystemType::Ntfs (since KCoreAddons 5.85)6NTFS filesystem
KFileSystemType::Exfat (since KCoreAddons 5.86)7ExFat filesystem
KFileSystemType::Fuse (since KCoreAddons 5.100)8(Filesystem in USErspace), this is used for a variety of underlying filesystems.

Function Documentation

[since 5.86] QString KFileSystemType::fileSystemName(KFileSystemType::Type type)

Returns the possibly translated name of a filesystem corresponding to a value from KFileSystemType::Type.

This function was introduced in 5.86.

[since 5.0] KFileSystemType::Type KFileSystemType::fileSystemType(const QString &path)

For a given path, returns the filesystem type, one of KFileSystemType::Type values. If the type can't be determined, KFileSystemType::Unknown is returned.

This function was introduced in 5.0.