Unfortunately std::ifstream and std::ofstream are allowed to fail in unobvious ways when given a duff file. In particular, gcc won't error out when a std::ifstream is created for a directory until the first read occurs. So we write our own stream buffer classes that do error checking and throw useful exceptions on error, and use those instead.
10 lines
146 B
Bash
Executable File
10 lines
146 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# vim: set ft=sh sw=4 sts=4 et :
|
|
|
|
if [ -d safe_ofstream_TEST_dir ] ; then
|
|
rm -fr safe_ofstream_TEST_dir
|
|
else
|
|
true
|
|
fi
|
|
|