diff options
| author | jhurst <jhurst@cinecert.com> | 2009-06-22 05:49:02 +0000 |
|---|---|---|
| committer | jhurst <> | 2009-06-22 05:49:02 +0000 |
| commit | a84ec32cfc61397feeb577637744031cc64d862d (patch) | |
| tree | a64185ae139d51e1b76fab7e2e9c00f5ef25628d /src/KM_fileio.cpp | |
| parent | e34beed6313ea4add7539608ecb92082728778f1 (diff) | |
new log and fileio features
XMLElement parse bugfix (was ignoring well-formedness errors)
Diffstat (limited to 'src/KM_fileio.cpp')
| -rw-r--r-- | src/KM_fileio.cpp | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/KM_fileio.cpp b/src/KM_fileio.cpp index 9808cfd..95bee9b 100644 --- a/src/KM_fileio.cpp +++ b/src/KM_fileio.cpp @@ -213,7 +213,7 @@ Kumu::FileSize(const std::string& pathname) // static PathCompList_t& -s_PathMakeCanonical(PathCompList_t& CList, char separator, bool is_absolute) +s_PathMakeCanonical(PathCompList_t& CList, bool is_absolute) { PathCompList_t::iterator ci, ri; // component and removal iterators @@ -247,7 +247,7 @@ Kumu::PathMakeCanonical(const std::string& Path, char separator) { PathCompList_t CList; bool is_absolute = PathIsAbsolute(Path, separator); - s_PathMakeCanonical(PathToComponents(Path, CList, separator), separator, is_absolute); + s_PathMakeCanonical(PathToComponents(Path, CList, separator), is_absolute); if ( is_absolute ) return ComponentsToAbsolutePath(CList, separator); @@ -353,7 +353,7 @@ Kumu::PathMakeAbsolute(const std::string& Path, char separator) CList.push_back(cwd_buf); CList.push_back(Path); - return ComponentsToAbsolutePath(s_PathMakeCanonical(CList, separator, true), separator); + return ComponentsToAbsolutePath(s_PathMakeCanonical(CList, true), separator); } // @@ -430,6 +430,28 @@ Kumu::PathSetExtension(const std::string& Path, const std::string& Extension) // } // +std::string +Kumu::PathJoin(const std::string& Path1, const std::string& Path2, char separator) +{ + return Path1 + separator + Path2; +} + +// +std::string +Kumu::PathJoin(const std::string& Path1, const std::string& Path2, const std::string& Path3, char separator) +{ + return Path1 + separator + Path2 + separator + Path3; +} + +// +std::string +Kumu::PathJoin(const std::string& Path1, const std::string& Path2, + const std::string& Path3, const std::string& Path4, char separator) +{ + return Path1 + separator + Path2 + separator + Path3 + separator + Path4; +} + +// Kumu::PathList_t& Kumu::FindInPaths(const IPathMatch& Pattern, const Kumu::PathList_t& SearchPaths, Kumu::PathList_t& FoundPaths, bool one_shot, char separator) |
