Lines Matching refs:path
59 void remove_directory(const char *path)
65 if (!(dir = opendir(path))) {
75 int result = snprintf(filepath, sizeof(filepath), "%s/%s", path, entry->d_name);
81 int result = snprintf(filepath, sizeof(filepath), "%s/%s", path, entry->d_name);
94 if (rmdir(path) == -1) {
95 t_error("%s error in rmdir test nftw path! \n", __func__);
99 void nftw_build_testfile(const char *path)
102 if (mkdir(path, 0755) == -1) {
103 t_error("%s error in mkdir test nftw path! %s \n", __func__, path);
108 int result = snprintf(file, sizeof(file), "%s/normal_file.txt", path);
120 result = snprintf(file, sizeof(file), "%s/non-executable_file.txt", path);
132 result = snprintf(file, sizeof(file), "%s/unauthorized_file.txt", path);
144 result = snprintf(file, sizeof(file), "%s/.hidden_file.txt", path);
156 result = snprintf(file, sizeof(file), "%s/read_only_file.txt", path);
168 result = snprintf(file, sizeof(file), "%s/symlink_to_normal_file", path);
182 char path[PATH_MAX];
183 int result = snprintf(path, sizeof(path), "%s", TEST_NFTW_PATH);
184 if (result >= sizeof(path)) {
188 result = snprintf(path, sizeof(path), "%s/data", path);
189 if (result >= sizeof(path)) {
192 nftw_build_testfile(path);
224 * @tc.desc : The file path length exceeds PATH_MAX, traverse the directory
229 char path[PATH_MAX * TEST_DIGIT_TWO];
230 memset(path, 'a', sizeof(path));
231 path[PATH_MAX * TEST_DIGIT_TWO - 1] = 0;
232 int ret = nftw(path, nftw_callback, TEST_FD_LIMIT, FTW_PHYS);