diff --git a/src/engine/fsutils.h b/src/engine/fsutils.h --- a/src/engine/fsutils.h +++ b/src/engine/fsutils.h @@ -29,13 +29,6 @@ namespace Baloo { namespace FSUtils { -/** - * Returns name of filesystem that @p directory is stored on. This - * only works on Linux and returns empty string on other platforms or when it's - * unable to detect the filesystem. - */ -QString getDirectoryFileSystem(const QString &directory); - /** * Disables filesystem copy-on-write feature on given file or directory. * Only implemented on Linux and does nothing on other platforms. diff --git a/src/engine/fsutils.cpp b/src/engine/fsutils.cpp --- a/src/engine/fsutils.cpp +++ b/src/engine/fsutils.cpp @@ -27,45 +27,12 @@ #ifdef Q_OS_LINUX #include #include -#include #include #include #endif using namespace Baloo; -QString FSUtils::getDirectoryFileSystem(const QString &directory) -{ -#ifndef Q_OS_LINUX - return QString(); -#else - QString bestMatchPath; - QString bestMatchFS; - - FILE *mtab = setmntent("/etc/mtab", "r"); - if (!mtab) { - return QString(); - } - while (mntent *mnt = getmntent(mtab)) { - if (qstrcmp(mnt->mnt_type, MNTTYPE_IGNORE) == 0) { - continue; - } - - const QString dir = QString::fromLocal8Bit(mnt->mnt_dir); - if (!directory.startsWith(dir) || dir.length() < bestMatchPath.length()) { - continue; - } - - bestMatchPath = dir; - bestMatchFS = QString::fromLocal8Bit(mnt->mnt_type); - } - - endmntent(mtab); - - return bestMatchFS; -#endif -} - void FSUtils::disableCoW(const QString &path) { #ifndef Q_OS_LINUX