-/* $Id$
-
-This file is part of libmspfs
-Copyright © 2006-2008 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
-#include <msp/core/except.h>
+#include <stdexcept>
#include <msp/strings/utils.h>
#include "path.h"
#include "utils.h"
return a;
}
-/**
-Attaches another path to the end of this one. An absolute path replaces the
-existing data. ".." elements annihilate the last component and "." elements
-are ignored.
-*/
Path &Path::operator/=(const Path &p)
{
if(p.is_absolute())
}
}
- throw InvalidParameterValue("Path component index out of range");
+ throw invalid_argument("Path::operator[]");
}
bool Path::operator==(const Path &p) const
}
}
-/**
-Adds a single component to the path, emulating the cd command. Fails horribly
-if comp contains a separator character.
-*/
void Path::add_component(const string &comp)
{
if(comp.empty())