CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LocalFileSystem.h
Go to the documentation of this file.
1 #ifndef STORAGE_FACTORY_LOCAL_FILE_SYSTEM_H
2 #define STORAGE_FACTORY_LOCAL_FILE_SYSTEM_H
3 #include <vector>
4 #include <string>
5 #include <utility>
6 
7 struct stat;
8 struct statfs;
9 struct mntent;
10 
11 namespace edm::storage {
13  struct FSInfo;
14 
15  public:
16  LocalFileSystem(void);
17 
18  // undefined, no semantics
19  LocalFileSystem(LocalFileSystem &) = delete;
20  void operator=(LocalFileSystem &) = delete;
21 
22  ~LocalFileSystem(void);
23 
24  bool isLocalPath(const std::string &path) const;
25  std::pair<std::string, std::string> findCachePath(const std::vector<std::string> &paths, double minFreeSpace) const;
26 
27  private:
28  int readFSTypes(void);
29  FSInfo *initFSInfo(void *p);
30  int initFSList(void);
31  int statFSInfo(FSInfo *i) const;
32  FSInfo *findMount(const char *path, struct statfs *sfs, struct stat *s, std::vector<std::string> &) const;
33 
34  std::vector<FSInfo *> fs_;
35  std::vector<std::string> fstypes_;
36  };
37 } // namespace edm::storage
38 #endif // STORAGE_FACTORY_LOCAL_FILE_SYSTEM_H
std::vector< FSInfo * > fs_
std::vector< std::string > fstypes_
Information about file systems on this node.
std::pair< std::string, std::string > findCachePath(const std::vector< std::string > &paths, double minFreeSpace) const
FSInfo * findMount(const char *path, struct statfs *sfs, struct stat *s, std::vector< std::string > &) const
bool isLocalPath(const std::string &path) const
void operator=(LocalFileSystem &)=delete
int statFSInfo(FSInfo *i) const