File indexing completed on 2024-04-28 05:49:05

0001 /* This file is part of the KDE project
0002  *
0003  *  SPDX-FileCopyrightText: 2014 Gregor Mi <codestruct@posteo.org>
0004  *
0005  *  SPDX-License-Identifier: LGPL-2.0-or-later
0006  */
0007 
0008 #pragma once
0009 
0010 #include <QString>
0011 
0012 class FileUtil
0013 {
0014 public:
0015     /**
0016      * @Returns the common path of two paths. E.g.
0017      * path1=/usr/local/bin
0018      * path2=/usr/bin
0019      * result=/usr
0020      *
0021      * TODO: Extend QUrl with this method and submit patch to QT
0022      */
0023     static const QString commonParent(const QString &path1, const QString &path2);
0024 };
0025 
0026 // kate: space-indent on; indent-width 4; replace-tabs on;