40 #ifdef CHECK_MEMORY_LEAKS
42 #endif // CHECK_MEMORY_LEAKS
53 if (path.length() == 0) {
56 while (path[path.length() - 1] ==
'/' || path[path.length() - 1] ==
'\\') {
57 path.erase(path.end() - 1);
59 if (path.length() == 0) {
63 bool ret = (stat(path.c_str(), &st) == 0);
73 size_t beg = path.find_last_of(
"\\/");
74 if (beg == std::string::npos || beg == 0) {
77 return path.substr(0, beg + 1);
83 const std::string& path) {
85 return retPath + path;
91 size_t colonPos = name.find(
":");
92 return (colonPos != std::string::npos) && (colonPos > 1);
102 if (path.length() > 0 && path[0] ==
'/') {
106 if (path.length() > 0 && path[0] ==
'\\') {
109 if (path.length() > 1 && path[1] ==
':') {
112 if (path ==
"nul" || path ==
"NUL") {
121 const std::string& basePath) {
134 strm.write((
char*) &value,
sizeof(
int));
141 strm.write((
char*) &value,
sizeof(
unsigned int));
148 strm.write((
char*) &value,
sizeof(
SUMOReal));
155 strm.write((
char*) &value,
sizeof(
char));
162 size_t size = value.length();
163 const char* cstr = value.c_str();
165 strm.write((
char*) cstr, (std::streamsize)(
sizeof(
char)*size));
172 strm.write((
char*) &value,
sizeof(
SUMOTime));