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

Function get_dir_status

src/remove.c:167–173  ·  view source on GitHub ↗

Return the status of the directory identified by FTS and ENT. This is -1 if the directory is empty, 0 if it is nonempty, and a positive error number if there was trouble determining the status, e.g., it is not a directory, or permissions problems, or I/O errors. Use *DIR_STATUS as a cache for the status. */

Source from the content-addressed store, hash-verified

165 e.g., it is not a directory, or permissions problems, or I/O errors.
166 Use *DIR_STATUS as a cache for the status. */
167static int
168get_dir_status (FTS const *fts, FTSENT const *ent, int *dir_status)
169{
170 if (*dir_status == DS_UNKNOWN)
171 *dir_status = directory_status (fts->fts_cwd_fd, ent->fts_accpath);
172 return *dir_status;
173}
174
175/* Prompt whether to remove FILENAME, if required via a combination of
176 the options specified by X and/or file attributes. If the file may

Callers 1

promptFunction · 0.85

Calls 1

directory_statusFunction · 0.85

Tested by

no test coverage detected