diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-29 21:15:18 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-01-29 21:15:18 +0000 |
commit | b71531b42b3325fd6079a7039aae8641262c8adf (patch) | |
tree | a5b9aa16924c541fcb424ee9460b1ac7f5a89352 /modules/CIAO/CCF/CCF/CompilerElements/FileSystem.hpp | |
parent | a0f67cc97c0050d907145e312135b60c0125e56e (diff) | |
download | ATCD-b71531b42b3325fd6079a7039aae8641262c8adf.tar.gz |
branching/taggingDS-main
Diffstat (limited to 'modules/CIAO/CCF/CCF/CompilerElements/FileSystem.hpp')
-rw-r--r-- | modules/CIAO/CCF/CCF/CompilerElements/FileSystem.hpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/modules/CIAO/CCF/CCF/CompilerElements/FileSystem.hpp b/modules/CIAO/CCF/CCF/CompilerElements/FileSystem.hpp new file mode 100644 index 00000000000..ba9483f04e6 --- /dev/null +++ b/modules/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 |