|
|
@@ -92,6 +92,38 @@ void log_info(const char* string, va_list arg)
|
|
|
printf("\n");
|
|
|
}
|
|
|
|
|
|
+//-----------------------------------------------------------------------------
|
|
|
+bool is_root_path(const char* path)
|
|
|
+{
|
|
|
+ assert(path != NULL);
|
|
|
+
|
|
|
+ if (string::strlen(path) == 1)
|
|
|
+ {
|
|
|
+ if (path[0] == PATH_SEPARATOR)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+}
|
|
|
+
|
|
|
+//-----------------------------------------------------------------------------
|
|
|
+bool is_absolute_path(const char* path)
|
|
|
+{
|
|
|
+ assert(path != NULL);
|
|
|
+
|
|
|
+ if (string::strlen(path) > 0)
|
|
|
+ {
|
|
|
+ if (path[0] == PATH_SEPARATOR)
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+}
|
|
|
+
|
|
|
//-----------------------------------------------------------------------------
|
|
|
bool exists(const char* path)
|
|
|
{
|