| 142 | } |
| 143 | |
| 144 | string S3Url::getExtension() const { |
| 145 | const string& path = this->prefix; |
| 146 | std::string::size_type pos = path.find_last_of('/'); |
| 147 | string filename = (pos == path.npos) ? path : path.substr(pos + 1); |
| 148 | |
| 149 | pos = filename.find_last_of('.'); |
| 150 | if (pos == filename.npos) { |
| 151 | return ""; |
| 152 | } |
| 153 | return filename.substr(pos); |
| 154 | } |
no outgoing calls