libzypp
10.5.0
|
00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00012 #ifndef ZYPP_MEDIA_MEDIADIR_H 00013 #define ZYPP_MEDIA_MEDIADIR_H 00014 00015 #include "zypp/media/MediaHandler.h" 00016 00017 namespace zypp { 00018 namespace media { 00019 00021 // 00022 // CLASS NAME : MediaDIR 00023 00028 class MediaDIR : public MediaHandler { 00029 00030 protected: 00031 00032 virtual void attachTo (bool next = false); 00033 virtual void releaseFrom( const std::string & ejectDev ); 00034 virtual void getFile( const Pathname & filename ) const; 00035 virtual void getDir( const Pathname & dirname, bool recurse_r ) const; 00036 virtual void getDirInfo( std::list<std::string> & retlist, 00037 const Pathname & dirname, bool dots = true ) const; 00038 virtual void getDirInfo( filesystem::DirContent & retlist, 00039 const Pathname & dirname, bool dots = true ) const; 00040 virtual bool getDoesFileExist( const Pathname & filename ) const; 00041 00042 public: 00043 00044 MediaDIR( const Url & url_r, 00045 const Pathname & attach_point_hint_r ); 00046 00047 virtual ~MediaDIR() { try { release(); } catch(...) {} } 00048 }; 00049 00051 00052 } // namespace media 00053 } // namespace zypp 00054 00055 #endif // ZYPP_MEDIA_MEDIADIR_H