}
+FILE*
+File::take()
+{
+ auto give = _file;
+ _file = nullptr;
+ return give;
+}
+
+
/** Windows can't "by default" cope with paths longer than 260 characters, so if you pass such a path to
* any boost::filesystem method it will fail. There is a "fix" for this, which is to prepend
* the string \\?\ to the path. This will make it work, so long as:
*/
void close();
+ boost::filesystem::path path() const {
+ return _path;
+ }
+
+ /** Take ownership of the underlying FILE*;
+ * the File object will not closed it after this call.
+ */
+ FILE* take();
+
private:
boost::filesystem::path _path;
FILE* _file = nullptr;