Lines Matching refs:path
41 static int ParamFileOpen(const char* path, int oflag, int mode)
44 return open(path, oflag, mode);
46 return UtilsFileOpen(path, oflag, mode);
77 static int ParamFileDelete(const char* path)
80 return unlink(path);
82 return UtilsFileDelete(path);
86 static int ParamFileStat(const char* path, unsigned int* fileSize)
89 int fd = open(path, O_RDONLY);
98 return UtilsFileStat(path, fileSize);
122 const char *path = PARAM_PERSIST_SAVE_TMP_PATH;
123 CheckAndCreateDir(path);
128 fd = ParamFileOpen(path, MODE_READ, 0);
130 path = PARAM_PERSIST_SAVE_PATH;
131 fd = ParamFileOpen(path, MODE_READ, 0);
132 PARAM_LOGI("LoadPersistParam open file %s", path);
134 PARAM_CHECK(fd >= 0, break, "No valid persist parameter file %s", path);
137 int ret = ParamFileStat(path, &fileSize);
138 PARAM_CHECK(ret == 0, break, "Failed to get file state %s", path);
142 PARAM_CHECK(ret >= 0, break, "Failed to read file %s", path);