X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ffs%2Fpath.cpp;h=784c6eb508cbd953629e0b3819ea82667e083566;hb=4c8b6a16bfe62541bc68aa0d3827158c9b9617da;hp=e514d36bfe490f5a4349f9a46946847221caa5f5;hpb=af94bc926e301e9b871dc18662b4fa6e5614fdbf;p=libs%2Fcore.git diff --git a/source/fs/path.cpp b/source/fs/path.cpp index e514d36..784c6eb 100644 --- a/source/fs/path.cpp +++ b/source/fs/path.cpp @@ -1,11 +1,4 @@ -/* $Id$ - -This file is part of libmspfs -Copyright © 2006-2008 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - -#include +#include #include #include "path.h" #include "utils.h" @@ -80,11 +73,6 @@ Path Path::operator/(const Path &p) const 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()) @@ -115,7 +103,7 @@ string Path::operator[](int n) const } } - throw InvalidParameterValue("Path component index out of range"); + throw invalid_argument("Path::operator[]"); } bool Path::operator==(const Path &p) const @@ -155,10 +143,6 @@ void Path::init(const string &p) } } -/** -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())