MCPcopy Create free account
hub / github.com/acl-dev/acl / get_filename

Method get_filename

lib_acl_cpp/src/serialize/gsoner.cpp:1263–1281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1261}
1262
1263std::string gsoner::get_filename(const char *filepath)
1264{
1265 std::string filename;
1266#if 1
1267 const char *ptr = acl_safe_basename(filepath);
1268 filename = ptr;
1269#else
1270 int i = (int) strlen(filepath) - 1;
1271
1272 while (i >= 0 && (filepath[i] != '\\' || filepath[i] != '/')) {
1273 filename.push_back(filepath[i]);
1274 i--;
1275 }
1276
1277 std::reverse(filename.begin(), filename.end());
1278#endif
1279
1280 return filename;
1281}
1282
1283bool gsoner::read_multi_file(const std::vector<std::string>& files)
1284{

Callers 5

test_parseFunction · 0.45
doUploadMethod · 0.45
doUploadMethod · 0.45
mime_testFunction · 0.45
mime_test1Function · 0.45

Calls 4

acl_safe_basenameFunction · 0.85
beginMethod · 0.80
push_backMethod · 0.45
endMethod · 0.45

Tested by 1

test_parseFunction · 0.36