remove a file and check for an error
| 1848 | |
| 1849 | // remove a file and check for an error |
| 1850 | void ASConsole::removeFile(const char* fileName_, const char* errMsg) const |
| 1851 | { |
| 1852 | if (remove(fileName_)) |
| 1853 | { |
| 1854 | if (errno == ENOENT) // no file is OK |
| 1855 | errno = 0; |
| 1856 | if (errno) |
| 1857 | { |
| 1858 | perror("errno message"); |
| 1859 | error(errMsg, fileName_); |
| 1860 | } |
| 1861 | } |
| 1862 | } |
| 1863 | |
| 1864 | // rename a file and check for an error |
| 1865 | void ASConsole::renameFile(const char* oldFileName, const char* newFileName, const char* errMsg) const |
nothing calls this directly
no outgoing calls
no test coverage detected