MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / MoveMatchingFiles

Function MoveMatchingFiles

tensorflow/core/kernels/kv_variable_ops.cc:47–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45namespace tensorflow {
46
47Status 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
61Status MoveSsdFiles(Env* env,
62 const gtl::ArraySlice<tstring>& input_prefixes,

Callers 1

MoveSsdFilesFunction · 0.85

Calls 3

GetMatchingPathsMethod · 0.45
sizeMethod · 0.45
RenameFileMethod · 0.45

Tested by

no test coverage detected