File indexing completed on 2024-04-21 03:50:56
0001 #ifndef FILENAMEHANDLER_H 0002 #define FILENAMEHANDLER_H 0003 0004 #include "core/serializer.h" 0005 0006 #include <QString> 0007 0008 class FileUtils 0009 { 0010 public: 0011 0012 /** @return a filterString containing the supported file extension to given outputType. */ 0013 static const char* filterString(Serializer::OutputType outputType); 0014 0015 /** @return a string with the suffix based on the outputType. */ 0016 static QString placeSuffix(const QString& filepath, Serializer::OutputType outputType); 0017 0018 /** Verify if the file is a jpg or png file. */ 0019 static bool isImageFile(const QString& filepath); 0020 0021 /** Verify if the file is a text file based on its filepath and contents. */ 0022 static bool isTextFile(const QString& filepath); 0023 }; 0024 0025 #endif