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

Function check_inputs

src/sort.c:4004–4015  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4002 common cases. */
4003
4004static void
4005check_inputs (char *const *files, size_t nfiles)
4006{
4007 for (size_t i = 0; i < nfiles; i++)
4008 {
4009 if (streq (files[i], "-"))
4010 continue;
4011
4012 if (euidaccess (files[i], R_OK) != 0)
4013 sort_die (_("cannot read"), files[i]);
4014 }
4015}
4016
4017/* Ensure a specified output file can be created or written to,
4018 and point stdout to it. Do not truncate the file.

Callers 1

mainFunction · 0.85

Calls 1

sort_dieFunction · 0.85

Tested by

no test coverage detected