1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/base/Fd.cc
14 #include <sys/types.h>
21 #include "zypp/base/Exception.h"
22 #include "zypp/base/Fd.h"
24 ///////////////////////////////////////////////////////////////////
26 { /////////////////////////////////////////////////////////////////
27 ///////////////////////////////////////////////////////////////////
29 { /////////////////////////////////////////////////////////////////
31 ///////////////////////////////////////////////////////////////////
33 // METHOD NAME : Fd::Fd
36 Fd::Fd( const Pathname & file_r, int open_flags, mode_t mode )
39 m_fd = open( file_r.asString().c_str(), open_flags, mode );
41 ZYPP_THROW_ERRNO_MSG( Exception, std::string("open ")+file_r.asString() );
44 ///////////////////////////////////////////////////////////////////
46 // METHOD NAME : Fd::close
58 /////////////////////////////////////////////////////////////////
60 ///////////////////////////////////////////////////////////////////
61 /////////////////////////////////////////////////////////////////
63 ///////////////////////////////////////////////////////////////////