MCPcopy Create free account
hub / github.com/cocos/cocos-engine / dictionaryWithDataOfFile

Method dictionaryWithDataOfFile

native/cocos/platform/FileUtils.cpp:109–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107 }
108
109 ValueMap dictionaryWithDataOfFile(const char *filedata, int filesize) {
110 _resultType = SAX_RESULT_DICT;
111 SAXParser parser;
112
113 CC_ASSERT(parser.init("UTF-8"));
114 parser.setDelegator(this);
115
116 parser.parse(filedata, filesize);
117 return _rootDict;
118 }
119
120 ValueVector arrayWithContentsOfFile(const ccstd::string &fileName) {
121 _resultType = SAX_RESULT_ARRAY;

Callers 1

getValueMapFromDataMethod · 0.80

Calls 3

setDelegatorMethod · 0.80
initMethod · 0.65
parseMethod · 0.45

Tested by

no test coverage detected