| 465 | |
| 466 | |
| 467 | mode_t Foam::mode(const fileName& name, const bool followLink) |
| 468 | { |
| 469 | if (POSIX::debug) |
| 470 | { |
| 471 | Pout<< FUNCTION_NAME << " : name:" << name << endl; |
| 472 | } |
| 473 | fileStat fileStatus(name, followLink); |
| 474 | if (fileStatus.isValid()) |
| 475 | { |
| 476 | return fileStatus.status().st_mode; |
| 477 | } |
| 478 | else |
| 479 | { |
| 480 | return 0; |
| 481 | } |
| 482 | } |
| 483 | |
| 484 | |
| 485 | Foam::fileName::Type Foam::type(const fileName& name, const bool followLink) |