X-Git-Url: https://git.decadent.org.uk/gitweb/?p=videolink.git;a=blobdiff_plain;f=temp_file.hpp;fp=temp_file.hpp;h=7402fe90df6044f17b8160a1aff9dbdd45caf526;hp=0000000000000000000000000000000000000000;hb=fed762f0b70eeb556c4b1bd660beb129099e8068;hpb=90012acc26c4a8210c4bce3dac69a09309cce9f8 diff --git a/temp_file.hpp b/temp_file.hpp new file mode 100644 index 0000000..7402fe9 --- /dev/null +++ b/temp_file.hpp @@ -0,0 +1,25 @@ +// Copyright 2005 Ben Hutchings . +// See the file "COPYING" for licence details. + +#ifndef INC_TEMP_FILE_HPP +#define INC_TEMP_FILE_HPP + +#include + +class temp_file +{ +public: + explicit temp_file(const std::string & base_name); + ~temp_file(); + + void close(); + + int get_fd() const { return fd_; } + const std::string & get_name() const { return name_; } + +private: + int fd_; + std::string name_; +}; + +#endif // !INC_TEMP_FILE_HPP