Util.h
Go to the documentation of this file.
1 
23 #pragma once
24 
25 #include "Stat.h"
26 
27 namespace IFS
28 {
37 bool isRootPath(const char*& path);
38 
39 #define FS_CHECK_PATH(path) isRootPath(path);
40 
41 /*
42  * Methods with a DirHandle parameter use this to check and cast to locally defined FileDir*
43  */
44 #define GET_FILEDIR() \
45  CHECK_MOUNTED() \
46  if(dir == nullptr) { \
47  return Error::InvalidHandle; \
48  } \
49  auto d = reinterpret_cast<FileDir*>(dir);
50 
51 // Final check before returning completed stat structure
52 void checkStat(Stat& stat);
53 
54 } // namespace IFS
void checkStat(Stat &stat)
bool isRootPath(const char *&path)
Check if path is root directory.
Definition: DirectoryTemplate.h:36