defuze.me
Client
|
00001 /************************************************************************** 00002 ** defuze.me Epitech Innovative Project 00003 ** 00004 ** Copyright 2010 00005 ** Athena Calmettes - Jocelyn De La Rosa - Francois Gaillard 00006 ** Adrien Jarthon - Alexandre Moore - Luc Peres - Arnaud Sellier 00007 ** 00008 ** All rights reserved. 00009 **************************************************************************/ 00010 00011 #ifndef LOCATION_HPP 00012 #define LOCATION_HPP 00013 00014 #include <QFile> 00015 #include <QDir> 00016 #include <QFileInfo> 00017 #include <QDateTime> 00018 00019 namespace DB 00020 { 00025 class Location 00026 { 00027 public: 00028 Location(const QString path); 00029 QString filePath() const; 00030 QDir dirPath() const; 00031 bool exists() const; 00032 QDateTime lastModified() const; 00033 int age() const; 00034 bool& open(); 00035 void reload(); 00036 void mkPath() const; 00037 00038 private: 00039 QFileInfo infos; 00040 bool _open; 00041 }; 00042 } 00043 00044 #endif // LOCATION_HPP