MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / remove

Method remove

source/MaaAdbControlUnit/Invoke/InvokeApp.cpp:144–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144bool InvokeApp::remove()
145{
146 LogFunc;
147
148 if (!pushed_) {
149 LogDebug << "Not pushed, skip remove";
150 return true;
151 }
152 if (tempname_.empty()) {
153 LogWarn << "tempname_ is empty";
154 return false;
155 }
156
157 merge_replacement({ { "{TO_REMOVED_FILE}", tempname_ } });
158
159 auto argv_opt = remove_file_argv_.gen(argv_replace_);
160 if (!argv_opt) {
161 return false;
162 }
163
164 auto output_opt = startup_and_read_pipe(*argv_opt);
165 if (!output_opt) {
166 return false;
167 }
168
169 pushed_ = false;
170 return true;
171}
172
173std::optional<std::string> InvokeApp::invoke_bin_and_read_pipe(const std::string& extra)
174{

Callers 4

MaaImageListBufferRemoveFunction · 0.45
deinit_binaryMethod · 0.45
remove_binaryMethod · 0.45

Calls 2

genMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected