libscio/fdstream.cpp
2020-04-25 17:42:26 +02:00

29 lines
443 B
C++

//
// fdstream.cpp
// libscio
//
// Created by Bob Polis at 2020-04-25
// Copyright (c) 2020 SwiftCoder. All rights reserved.
//
#include "libscio.hpp"
#include <unistd.h>
sc::io::fdostream::~fdostream() {
if (_outbuf.fd() != -1) {
::close(_outbuf.fd());
}
}
sc::io::fdistream::~fdistream() {
if (_inbuf.fd() != -1) {
::close(_inbuf.fd());
}
}
sc::io::fdstream::~fdstream() {
if (_iobuf.fd() != -1) {
::close(_iobuf.fd());
}
}