Given directory = "dir", base_name = "test", number = 0, extension = "xml", returns "dir/test.xml". If number is greater than zero (e.g., 12), returns "dir/test_12.xml". On Windows platform, uses \ as the separator rather than /.
| 8010 | // than zero (e.g., 12), returns "dir/test_12.xml". |
| 8011 | // On Windows platform, uses \ as the separator rather than /. |
| 8012 | FilePath FilePath::MakeFileName(const FilePath& directory, |
| 8013 | const FilePath& base_name, |
| 8014 | int number, |
| 8015 | const char* extension) { |
| 8016 | std::string file; |
| 8017 | if (number == 0) { |
| 8018 | file = base_name.string() + "." + extension; |
| 8019 | } else { |
| 8020 | file = base_name.string() + "_" + StreamableToString(number) |
| 8021 | + "." + extension; |
| 8022 | } |
| 8023 | return ConcatPaths(directory, FilePath(file)); |
| 8024 | } |
| 8025 | |
| 8026 | // Given directory = "dir", relative_path = "test.xml", returns "dir/test.xml". |
| 8027 | // On Windows, uses \ as the separator rather than /. |
nothing calls this directly
no test coverage detected