Lines Matching defs:fileName
81 static inline bool IsFileExists(const std::string& fileName)
83 return (access(fileName.c_str(), F_OK) == 0);
86 static bool CheckFileName(const std::string& fileName)
88 std::string::size_type pos = fileName.find("_");
93 if (!IsNum(fileName.substr(0, pos))) {
102 std::string deviceName = fileName.substr(pos + 1);
107 std::cout << "Check device file name:" << fileName << std::endl;
336 bool VirtualDevice::ClearFileResidues(const std::string& fileName)
338 const std::string::size_type pos = fileName.find("_");
339 const std::string processPath = "/proc/" + fileName.substr(0, pos) + "/";
344 if (!CheckFileName(fileName)) {
373 if (remove((g_folderPath + fileName).c_str()) != 0) {
381 if (remove((g_folderPath + fileName).c_str()) != 0) {