blob: 5cdc41609816ecf3bf932e78e768765d2a738bc4 [file] [log] [blame]
bigbiff bigbiff34684ff2013-12-01 21:03:45 -05001/*
Ethan Yonker3fdcda42016-11-30 12:29:37 -06002 Copyright 2013 to 2016 TeamWin
bigbiff bigbiff34684ff2013-12-01 21:03:45 -05003 This file is part of TWRP/TeamWin Recovery Project.
4
5 TWRP is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 TWRP is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with TWRP. If not, see <http://www.gnu.org/licenses/>.
17*/
18
Ethan Yonker3fdcda42016-11-30 12:29:37 -060019#ifndef TWEXCLUDE_HPP
20#define TWEXCLUDE_HPP
bigbiff bigbiff34684ff2013-12-01 21:03:45 -050021
bigbiff bigbiff34684ff2013-12-01 21:03:45 -050022#include <string>
23#include <vector>
bigbiff bigbiff34684ff2013-12-01 21:03:45 -050024
25using namespace std;
26
Ethan Yonker3fdcda42016-11-30 12:29:37 -060027class TWExclude {
bigbiff bigbiff34684ff2013-12-01 21:03:45 -050028
29public:
Ethan Yonker3fdcda42016-11-30 12:29:37 -060030 TWExclude();
bigbiff bigbiff34684ff2013-12-01 21:03:45 -050031 uint64_t Get_Folder_Size(const string& Path); // Gets the folder's size using stat
Vojtech Bocek05f87d62014-03-11 22:08:23 +010032 void add_absolute_dir(const string& Path);
33 void add_relative_dir(const string& Path);
34 bool check_relative_skip_dirs(const string& dir);
35 bool check_absolute_skip_dirs(const string& path);
Vojtech Bocek05f87d62014-03-11 22:08:23 +010036 bool check_skip_dirs(const string& path);
bigbiff bigbiffc7360dd2014-01-25 15:02:57 -050037 void clear_relative_dir(string dir);
bigbiff bigbiff34684ff2013-12-01 21:03:45 -050038private:
39 vector<string> absolutedir;
40 vector<string> relativedir;
bigbiff bigbiff34684ff2013-12-01 21:03:45 -050041};
42
bigbiff bigbiff34684ff2013-12-01 21:03:45 -050043#endif