| 111 | } |
| 112 | |
| 113 | String FileSystemBase::GetExtension(const StringView& path) |
| 114 | { |
| 115 | Char chr; |
| 116 | int32 length = path.Length(); |
| 117 | int32 num = length; |
| 118 | do |
| 119 | { |
| 120 | num--; |
| 121 | if (num < 0) |
| 122 | { |
| 123 | break; |
| 124 | } |
| 125 | chr = path[num]; |
| 126 | if (chr != '.') |
| 127 | { |
| 128 | continue; |
| 129 | } |
| 130 | if (num == length - 1) |
| 131 | { |
| 132 | return String::Empty; |
| 133 | } |
| 134 | num++; |
| 135 | return path.Substring(num, length - num); |
| 136 | } while (chr != TEXT('\\') && chr != TEXT('/') && chr != TEXT(':')); |
| 137 | |
| 138 | return String::Empty; |
| 139 | } |
| 140 | |
| 141 | void FileSystemBase::GetTempFilePath(String& tmpPath) |
| 142 | { |
no test coverage detected