TODO(coffler): Refactor code to eliminate redundant function.
| 201 | |
| 202 | // TODO(coffler): Refactor code to eliminate redundant function. |
| 203 | static Try<string> copyFile( |
| 204 | const string& sourcePath, const string& destinationPath) |
| 205 | { |
| 206 | const Try<Nothing> result = os::copyfile(sourcePath, destinationPath); |
| 207 | |
| 208 | if (result.isError()) { |
| 209 | return Error(result.error()); |
| 210 | } |
| 211 | |
| 212 | return destinationPath; |
| 213 | } |
| 214 | |
| 215 | |
| 216 | static Try<string> download( |