| Line | |
|---|
| 1 | // -------------------------------------------------------------------------- |
|---|
| 2 | // |
|---|
| 3 | // File |
|---|
| 4 | // Name: PathUtils.cpp |
|---|
| 5 | // Purpose: Platform-independent path manipulation |
|---|
| 6 | // Created: 2007/01/17 |
|---|
| 7 | // |
|---|
| 8 | // -------------------------------------------------------------------------- |
|---|
| 9 | |
|---|
| 10 | #include "Box.h" |
|---|
| 11 | #include <string> |
|---|
| 12 | |
|---|
| 13 | // -------------------------------------------------------------------------- |
|---|
| 14 | // |
|---|
| 15 | // Function |
|---|
| 16 | // Name: MakeFullPath(const std::string& rDir, const std::string& rFile) |
|---|
| 17 | // Purpose: Combine directory and file name |
|---|
| 18 | // Created: 2006/08/10 |
|---|
| 19 | // |
|---|
| 20 | // -------------------------------------------------------------------------- |
|---|
| 21 | std::string MakeFullPath(const std::string& rDir, const std::string& rEntry) |
|---|
| 22 | { |
|---|
| 23 | std::string result(rDir); |
|---|
| 24 | |
|---|
| 25 | if (result.size() > 0 && |
|---|
| 26 | result[result.size()-1] != DIRECTORY_SEPARATOR_ASCHAR) |
|---|
| 27 | { |
|---|
| 28 | result += DIRECTORY_SEPARATOR; |
|---|
| 29 | } |
|---|
| 30 | |
|---|
| 31 | result += rEntry; |
|---|
| 32 | |
|---|
| 33 | return result; |
|---|
| 34 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.