MCPcopy Create free account
hub / github.com/coreutils/coreutils / clear_files

Function clear_files

src/ls.c:3210–3232  ·  view source on GitHub ↗

Empty the table of files. */

Source from the content-addressed store, hash-verified

3208
3209/* Empty the table of files. */
3210static void
3211clear_files (void)
3212{
3213 for (idx_t i = 0; i < cwd_n_used; i++)
3214 {
3215 struct fileinfo *f = sorted_file[i];
3216 free_ent (f);
3217 }
3218
3219 cwd_n_used = 0;
3220 cwd_some_quoted = false;
3221 any_has_acl = false;
3222 inode_number_width = 0;
3223 block_size_width = 0;
3224 nlink_width = 0;
3225 owner_width = 0;
3226 group_width = 0;
3227 author_width = 0;
3228 scontext_width = 0;
3229 major_device_number_width = 0;
3230 minor_device_number_width = 0;
3231 file_size_width = 0;
3232}
3233
3234/* Cache file_has_aclinfo failure, when it's trivial to do.
3235 Like file_has_aclinfo, but when F's st_dev says it's on a file

Callers 2

mainFunction · 0.85
print_dirFunction · 0.85

Calls 1

free_entFunction · 0.85

Tested by

no test coverage detected