MCPcopy Create free account
hub / github.com/CyanogenMod/android_frameworks_base / openReadWrite

Function openReadWrite

tools/aapt/Command.cpp:69–89  ·  view source on GitHub ↗

* Open the file read-write. The file will be created if it doesn't * already exist and "okayToCreate" is set. * * Returns NULL on failure. */

Source from the content-addressed store, hash-verified

67 * Returns NULL on failure.
68 */
69ZipFile* openReadWrite(const char* fileName, bool okayToCreate)
70{
71 ZipFile* zip = NULL;
72 status_t result;
73 int flags;
74
75 flags = ZipFile::kOpenReadWrite;
76 if (okayToCreate)
77 flags |= ZipFile::kOpenCreate;
78
79 zip = new ZipFile;
80 result = zip->open(fileName, flags);
81 if (result != NO_ERROR) {
82 delete zip;
83 zip = NULL;
84 goto bail;
85 }
86
87bail:
88 return zip;
89}
90
91
92/*

Callers 2

doAddFunction · 0.85
doRemoveFunction · 0.85

Calls 1

openMethod · 0.45

Tested by

no test coverage detected