| 45 | namespace tensorflow { |
| 46 | |
| 47 | Status MoveMatchingFiles( |
| 48 | Env* env, |
| 49 | const tstring& pattern, |
| 50 | const tstring& merged_prefix, |
| 51 | int64 input_prefix_size) { |
| 52 | std::vector<tstring> file_vec; |
| 53 | TF_RETURN_IF_ERROR(env->GetMatchingPaths(pattern, &file_vec)); |
| 54 | for (int64 i = 0; i < file_vec.size(); i++) { |
| 55 | const tstring& filename = file_vec[i].substr(input_prefix_size); |
| 56 | TF_RETURN_IF_ERROR(env->RenameFile(file_vec[i], merged_prefix + filename)); |
| 57 | } |
| 58 | return Status::OK(); |
| 59 | } |
| 60 | |
| 61 | Status MoveSsdFiles(Env* env, |
| 62 | const gtl::ArraySlice<tstring>& input_prefixes, |
no test coverage detected