Util.h
Go to the documentation of this file.
1 
23 #pragma once
24 
25 #include "Error.h"
26 
27 namespace IFS
28 {
29 /*
30  * Paths equal to "/" or "" are empty and considered equivalent to nullptr.
31  * Methods or functions can use this macro to resolve these for simpler parsing.
32  */
33 #define FS_CHECK_PATH(path) \
34  if(path) { \
35  if(*path == '/') { \
36  ++path; \
37  } \
38  if(*path == '\0') { \
39  path = nullptr; \
40  } \
41  }
42 
43 } // namespace IFS
Definition: DirectoryTemplate.h:36