CMS 3D CMS Logo

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 
12 {
13  struct FSInfo;
14 public:
15  LocalFileSystem(void);
16  ~LocalFileSystem(void);
17 
18  bool isLocalPath(const std::string &path) const;
19  std::pair<std::string, std::string> findCachePath(const std::vector<std::string> &paths, double minFreeSpace) const;
20 
21 private:
22  int readFSTypes(void);
23  FSInfo * initFSInfo(void *p);
24  int initFSList(void);
25  int statFSInfo(FSInfo *i) const;
26  FSInfo * findMount(const char *path, struct statfs *sfs, struct stat *s, std::vector<std::string> &) const;
27 
28  std::vector<FSInfo *> fs_;
29  std::vector<std::string> fstypes_;
30 
31  // undefined, no semantics
32  LocalFileSystem(LocalFileSystem &) = delete;
33  void operator=(LocalFileSystem &) = delete;
34 };
35 
36 #endif // STORAGE_FACTORY_LOCAL_FILE_SYSTEM_H
int statFSInfo(FSInfo *i) const
Information about file systems on this node.
int readFSTypes(void)
void operator=(LocalFileSystem &)=delete
std::vector< std::string > fstypes_
FSInfo * initFSInfo(void *p)
bool isLocalPath(const std::string &path) const
std::pair< std::string, std::string > findCachePath(const std::vector< std::string > &paths, double minFreeSpace) const
std::vector< FSInfo * > fs_
FSInfo * findMount(const char *path, struct statfs *sfs, struct stat *s, std::vector< std::string > &) const