blob: ba9483f04e628a6b65b4a809631d66b8f31bbba3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
|