summaryrefslogtreecommitdiff
path: root/CIAO/CCF/CCF/CompilerElements/FileSystem.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'CIAO/CCF/CCF/CompilerElements/FileSystem.hpp')
-rw-r--r--CIAO/CCF/CCF/CompilerElements/FileSystem.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/CIAO/CCF/CCF/CompilerElements/FileSystem.hpp b/CIAO/CCF/CCF/CompilerElements/FileSystem.hpp
new file mode 100644
index 00000000000..ba9483f04e6
--- /dev/null
+++ b/CIAO/CCF/CCF/CompilerElements/FileSystem.hpp
@@ -0,0 +1,33 @@
+// file : CCF/CompilerElements/FileSystem.hpp
+// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
+// cvs-id : $Id$
+
+#ifndef CCF_RUNTIME_FILE_SYSTEM_HPP
+#define CCF_RUNTIME_FILE_SYSTEM_HPP
+
+#include <string>
+
+#include <boost/filesystem/path.hpp>
+#include <boost/filesystem/fstream.hpp>
+#include <boost/filesystem/exception.hpp>
+#include <boost/filesystem/operations.hpp>
+
+namespace fs
+{
+ using namespace boost::filesystem;
+
+ inline path
+ normalize (path const& p)
+ {
+ path result;
+
+ for (path::iterator i (p.begin ()), e (p.end ()); i != e; ++i)
+ {
+ if (*i != ".") result /= path (*i, native);
+ }
+
+ return result;
+ }
+}
+
+#endif // CCF_RUNTIME_FILE_SYSTEM_HPP