MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / CleanUpAfterFailedWrite

Function CleanUpAfterFailedWrite

Bcore/src/main/cpp/android-base/file.cpp:95–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95static bool CleanUpAfterFailedWrite(const std::string& path) {
96 // Something went wrong. Let's not leave a corrupt file lying around.
97 int saved_errno = errno;
98 unlink(path.c_str());
99 errno = saved_errno;
100 return false;
101}
102
103#if !defined(_WIN32)
104bool WriteStringToFile(const std::string& content, const std::string& path,

Callers 1

WriteStringToFileFunction · 0.85

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected