libutil++  1.9.3
 All Classes Functions Variables
Path.h
1 /*
2 ** libutil++
3 ** $Id: Path.h 1879 2017-04-09 18:30:09Z sella $
4 ** Copyright (c) 2011-2016 Digital Genesis, LLC. All Rights Reserved.
5 ** Released under the LGPL Version 2.1 License.
6 ** http://www.digitalgenesis.com
7 */
8 
9 #ifndef __libutilxx__sella__util__Path_H__
10 #define __libutilxx__sella__util__Path_H__
11 
12 #include "../../common.h"
13 #include "PathException.h"
14 
15 #include <vector>
16 #include <string>
17 
18 namespace sella {
19  namespace util {
20  class Path;
21  }
22 }
23 
25  public:
26  static std::vector<std::string>& search(std::vector<std::string> &file, const std::string &path, const std::string &regex) throw (PathException);
27 
28  static std::string create(const std::vector<std::string> &path, mode_t mode = 0750, uid_t uid = -1, gid_t gid = -1) throw (PathException);
29  static std::string create(const std::string &path, mode_t mode = 0750, uid_t uid = -1, gid_t gid = -1) throw (PathException);
30 
31  static void unlink(const std::string &path) throw (PathException); /* Recursively deletes path */
32 
33  static uint64_t getPartitionSize(const std::string &path) throw (PathException);
34  static uint64_t getPartitionUsed(const std::string &path) throw (PathException);
35  static uint64_t getPartitionFree(const std::string &path) throw (PathException);
36  static double getPartitionFull(const std::string &path) throw (PathException);
37 };
38 
39 #endif
40 
41 /*
42 ** vim: noet ts=3 sw=3
43 */