MCPcopy Create free account
hub / github.com/BlueMatthew/WechatExporter / existsFile

Function existsFile

WechatExporter/core/FileSystem.cpp:241–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241bool existsFile(const std::string& path)
242{
243#ifdef _WIN32
244 CW2T pszT(CA2W(path.c_str(), CP_UTF8));
245
246 DWORD dwAttrib = ::GetFileAttributes((LPCTSTR)pszT);
247
248 return (dwAttrib != INVALID_FILE_ATTRIBUTES &&
249 (dwAttrib & FILE_ATTRIBUTE_DIRECTORY) == 0);
250#else
251 struct stat sb;
252 return (stat(path.c_str(), &sb) == 0);
253#endif
254}
255
256bool listSubDirectories(const std::string& path, std::vector<std::string>& subDirectories)
257{

Callers 13

loadMethod · 0.85
copyFileMethod · 0.85
isValidBackupItemMethod · 0.85
isValidMobileSyncMethod · 0.85
hasPreviousExportingMethod · 0.85
exportUserMethod · 0.85
loadStringsMethod · 0.85
parseAppMsgMethod · 0.85
onTaskCompleteMethod · 0.85
runMethod · 0.85
copyFileFunction · 0.85

Calls 1

statClass · 0.70

Tested by

no test coverage detected