diff options
Diffstat (limited to 'p2pvr/lib/fileHandle.cpp')
-rw-r--r-- | p2pvr/lib/fileHandle.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/p2pvr/lib/fileHandle.cpp b/p2pvr/lib/fileHandle.cpp deleted file mode 100644 index e568f44..0000000 --- a/p2pvr/lib/fileHandle.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "fileHandle.h" -#include <unistd.h> -#include <stdexcept> - -namespace P2PVR { -class InvalidFileHandle : public std::runtime_error { - public: - InvalidFileHandle() : std::runtime_error("Invalid file handle") { } -}; - -FileHandle::FileHandle(int f) : - fd(f) -{ - if (fd < 0) { - throw InvalidFileHandle(); - } -} - -FileHandle::~FileHandle() -{ - close(fd); -} - -FileHandle::operator int() const -{ - return fd; -} -} - |