summaryrefslogtreecommitdiffstats
path: root/rtemstoolkit/rld-path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rtemstoolkit/rld-path.cpp')
-rw-r--r--rtemstoolkit/rld-path.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/rtemstoolkit/rld-path.cpp b/rtemstoolkit/rld-path.cpp
index 333c1c2..c848676 100644
--- a/rtemstoolkit/rld-path.cpp
+++ b/rtemstoolkit/rld-path.cpp
@@ -214,5 +214,23 @@ namespace rld
throw rld::error ("Not found", "unlinking: " + path);
}
}
+
+ void
+ get_system_path (paths& paths)
+ {
+ const char* path = ::getenv ("PATH");
+ strings ps;
+ rld::split (ps, path, RLD_PATHSTR_SEPARATOR);
+ if (ps.size ())
+ {
+ for (strings::iterator psi = ps.begin ();
+ psi != ps.end ();
+ ++psi)
+ {
+ if (check_directory (*psi))
+ paths.push_back (*psi);
+ }
+ }
+ }
}
}