aboutsummaryrefslogtreecommitdiff
path: root/src/support/filesystem_context.h
blob: 2088c6bfb4c4b9508f9abbe0565bec96c38a082a (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
34
35
36
#ifndef INPUTXSLT_SRC_SUPPORT_FILESYSTEM_CONTEXT_H_
#define INPUTXSLT_SRC_SUPPORT_FILESYSTEM_CONTEXT_H_

#include <xalanc/XalanDOM/XalanDOMString.hpp>
#include <xalanc/XPath/Function.hpp>

#include "boost/filesystem.hpp"

#include <string>
#include <functional>

#include "common.h"

namespace InputXSLT {

class FilesystemContext {
	public:
		static void iterate(
			const boost::filesystem::path&,
			const std::function<void(const boost::filesystem::path&)>&
		);

		explicit FilesystemContext(const boost::filesystem::path&);
		explicit FilesystemContext(const std::string&);

		boost::filesystem::path resolve(const xalan::XalanDOMString&) const;
		boost::filesystem::path resolve(const boost::filesystem::path&) const;

	private:
		const boost::filesystem::path path_;

};

}

#endif  // INPUTXSLT_SRC_SUPPORT_FILESYSTEM_CONTEXT_H_