| 982 | |
| 983 | |
| 984 | bool Foam::rm(const fileName& file) |
| 985 | { |
| 986 | if (POSIX::debug) |
| 987 | { |
| 988 | //InfoInFunction |
| 989 | Pout<< FUNCTION_NAME << " : Removing : " << file << endl; |
| 990 | if ((POSIX::debug & 2) && !Pstream::master()) |
| 991 | { |
| 992 | error::printStack(Pout); |
| 993 | } |
| 994 | } |
| 995 | |
| 996 | // Try returning plain file name; if not there, try with .gz |
| 997 | if (remove(file.c_str()) == 0) |
| 998 | { |
| 999 | return true; |
| 1000 | } |
| 1001 | else |
| 1002 | { |
| 1003 | return ::remove(string(file + ".gz").c_str()) == 0; |
| 1004 | } |
| 1005 | } |
| 1006 | |
| 1007 | |
| 1008 | bool Foam::rmDir(const fileName& directory) |
no test coverage detected