Overte C++ Documentation
FileUtils.h
1 //
2 // FileUtils.h
3 // interface/src
4 //
5 // Created by Stojce Slavkovski on 12/23/13.
6 // Copyright 2013 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_FileUtils_h
13 #define hifi_FileUtils_h
14 
15 #include <QtCore/QString>
16 
17 class FileUtils {
18 
19 public:
20  static const QStringList& getFileSelectors();
21  static QString selectFile(const QString& fileName);
22  static void locateFile(const QString& fileName);
23  static bool exists(const QString& fileName);
24  static bool isRelative(const QString& fileName);
25  static QString standardPath(QString subfolder);
26  static QString readFile(const QString& filename);
27  static QStringList readLines(const QString& filename, Qt::SplitBehavior splitBehavior = Qt::KeepEmptyParts);
28  static QString replaceDateTimeTokens(const QString& path);
29  static QString computeDocumentPath(const QString& path);
30  static bool canCreateFile(const QString& fullPath);
31  static QString getParentPath(const QString& fullPath);
32 };
33 
34 #endif // hifi_FileUtils_h