summaryrefslogtreecommitdiff
path: root/gentoobrowse-api/service/fileUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gentoobrowse-api/service/fileUtils.cpp')
-rw-r--r--gentoobrowse-api/service/fileUtils.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/gentoobrowse-api/service/fileUtils.cpp b/gentoobrowse-api/service/fileUtils.cpp
index cfa02bc..05f797f 100644
--- a/gentoobrowse-api/service/fileUtils.cpp
+++ b/gentoobrowse-api/service/fileUtils.cpp
@@ -5,6 +5,15 @@
namespace Gentoo {
namespace Utils {
+ namespace File {
+ boost::filesystem::path operator/(const boost::filesystem::path & p, unsigned int n)
+ {
+ auto pp = p.begin();
+ while (n--) ++pp;
+ return *pp;
+ }
+ }
+
FileHandle::FileHandle(const std::string & path) :
fh(open(path.c_str(), O_RDONLY))
{