diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2007-07-03 04:20:36 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2007-07-03 04:20:36 +0000 |
| commit | 65cc463f1d91fe99acf1c4dd9bce7e0038593022 (patch) | |
| tree | 95644c3c42a4a23db50dc42722cdeb4489427e14 /pokemod/Path.cpp | |
| parent | 9102febc37475af113681eaaee02ecc2ea04b4da (diff) | |
| download | sigen-65cc463f1d91fe99acf1c4dd9bce7e0038593022.tar.gz sigen-65cc463f1d91fe99acf1c4dd9bce7e0038593022.tar.xz sigen-65cc463f1d91fe99acf1c4dd9bce7e0038593022.zip | |
Fixed Logging, minor fixes, got rid of NatureEffect, and started migration from wxGTK to Qt
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@22 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Path.cpp')
| -rw-r--r-- | pokemod/Path.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pokemod/Path.cpp b/pokemod/Path.cpp index 2e7e8a20..244e71e2 100644 --- a/pokemod/Path.cpp +++ b/pokemod/Path.cpp @@ -57,7 +57,7 @@ bool PokeGen::PokeMod::Path::DoesExist() return true;
}
-bool PokeGen::PokeMod::Path::HasExtension(const String &ext)
+bool PokeGen::PokeMod::Path::HasExtension(const String &ext) const
{
size_t pos = rfind('.');
bool ret = true;
@@ -69,6 +69,15 @@ bool PokeGen::PokeMod::Path::HasExtension(const String &ext) return ret;
}
+PokeGen::PokeMod::String PokeGen::PokeMod::Path::GetFilename() const +{ + size_t pos = rfind('/'); + String fileName(substr(pos + 1)); + if ((pos == npos) || (pos + 1 == length())) + return ""; + return fileName; +} + bool PokeGen::PokeMod::Path::CopyTo(const String &dest)
{
if (!DoesExist())
|
