Lines Matching refs:file
4 * you may not use this file except in compliance with the License.
107 char file[PATH_MAX];
108 int result = snprintf(file, sizeof(file), "%s/normal_file.txt", path);
109 if (result >= sizeof(file)) {
112 // Create plain file
113 int fd = open(file, O_WRONLY | O_CREAT, 0644);
120 result = snprintf(file, sizeof(file), "%s/non-executable_file.txt", path);
121 if (result >= sizeof(file)) {
124 // Create non-executable file
125 fd = open(file, O_WRONLY | O_CREAT, 0666);
132 result = snprintf(file, sizeof(file), "%s/unauthorized_file.txt", path);
133 if (result >= sizeof(file)) {
136 // Create unauthorized file
137 fd = open(file, O_WRONLY | O_CREAT, 0000);
144 result = snprintf(file, sizeof(file), "%s/.hidden_file.txt", path);
145 if (result >= sizeof(file)) {
149 fd = open(file, O_WRONLY | O_CREAT, 0644);
156 result = snprintf(file, sizeof(file), "%s/read_only_file.txt", path);
157 if (result >= sizeof(file)) {
161 fd = open(file, O_WRONLY | O_CREAT, 0444);
168 result = snprintf(file, sizeof(file), "%s/symlink_to_normal_file", path);
169 if (result >= sizeof(file)) {
173 if (symlink("normal_file.txt", file) == -1) {
213 * @tc.desc : Traverse directory /data, but the maximum number of file descriptors is 0
224 * @tc.desc : The file path length exceeds PATH_MAX, traverse the directory