X-Git-Url: http://git.home-dn.net/?p=manu%2Fsuphp.git;a=blobdiff_plain;f=src%2FFile.cpp;h=d5183f3159fe0b3f59d2b28cc571d284e719929a;hp=b0b20c251583588edbb491b7026cbf938b3abb53;hb=8ac71cea2f0eea00e1e8b126531f4dc0498fbd4f;hpb=2a758f9f80a0074585f6a4c603cde9be03502d4e diff --git a/src/File.cpp b/src/File.cpp index b0b20c2..d5183f3 100644 --- a/src/File.cpp +++ b/src/File.cpp @@ -1,5 +1,5 @@ /* - suPHP - (c)2002-2005 Sebastian Marsching + suPHP - (c)2002-2008 Sebastian Marsching This file is part of suPHP. @@ -36,12 +36,12 @@ std::string suPHP::File::getPath() const{ return this->path; } -SmartPtr suPHP::File::getInputStream() throw (IOException) { +SmartPtr suPHP::File::getInputStream() const throw (IOException) { std::ifstream* infile = new std::ifstream(); infile->open(this->path.c_str()); if (infile->bad() || infile->fail()) { - throw IOException("Could not open file " + - this->path + " for reading", __FILE__, __LINE__); + throw IOException("Could not open file " + + this->path + " for reading", __FILE__, __LINE__); } return SmartPtr(infile); } @@ -108,6 +108,7 @@ GroupInfo suPHP::File::getGroup() const throw (SystemException) { return API_Helper::getSystemAPI().File_getGroup(*this); } + bool suPHP::File::isSymlink() const throw (SystemException) { return API_Helper::getSystemAPI().File_isSymlink(*this); }