MCPcopy Create free account
hub / github.com/Singular/Singular / feVerifyResourceValue

Function feVerifyResourceValue

resources/feResource.cc:414–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412
413
414static int feVerifyResourceValue(feResourceType type, char* value)
415{
416#ifdef RESOURCE_DEBUG
417 printf("feVerifyResourceValue(type: %d, value: \"%s\"): entering\n", (int)type, value);
418 printf("Access: ROK: %d, XOK: %d\n", access(value, R_OK), access(value, X_OK));
419#endif
420 switch(type)
421 {
422 case feResUrl:
423 case feResPath:
424 return 1;
425
426 case feResFile:
427 return ! access(value, R_OK);
428
429 case feResBinary:
430 case feResDir:
431 return ! access(value, X_OK);
432
433 default:
434 return 0;
435 }
436}
437
438/*****************************************************************
439 *

Callers 1

feInitResourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected