diff options
author | Sascha Volkenandt <sascha (at) akv-soft (dot) de> | 2007-05-31 16:23:54 +0000 |
---|---|---|
committer | Sascha Volkenandt <sascha (at) akv-soft (dot) de> | 2007-05-31 16:23:54 +0000 |
commit | 9fa0576e38559ebe7ff63a8d1161123b049a933b (patch) | |
tree | 276c6b65a024f7bcb7bd72b8fb623ae135b0091a /filecache.cpp | |
parent | 98e68abaf03928f29dd3fa1252d20ceb3b08144a (diff) | |
download | vdr-plugin-live-9fa0576e38559ebe7ff63a8d1161123b049a933b.tar.gz vdr-plugin-live-9fa0576e38559ebe7ff63a8d1161123b049a933b.tar.bz2 |
- some optimisations
- added dropping items out of cache
Diffstat (limited to 'filecache.cpp')
-rw-r--r-- | filecache.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/filecache.cpp b/filecache.cpp index 9a21647..37a1e85 100644 --- a/filecache.cpp +++ b/filecache.cpp @@ -10,22 +10,10 @@ std::time_t FileObject::get_filetime( std::string const& path ) { struct stat sbuf; if ( stat( path.c_str(), &sbuf ) < 0 ) - return 0; // XXX + return 0; return sbuf.st_ctime; } -bool FileObject::is_current() const -{ - return m_ctime < get_filetime( m_path ); - /*struct stat statBuf = { 0 }; - * if ( ::stat( m_path.c_str(), &statBuf ) < 0 ) { - * } - if ( m_ctime == 0 ) - return true; - m_ctime = get_filetime( m_path ); - return timestamp < m_ctime;*/ -} - bool FileObject::load() { std::ifstream ifs( m_path.c_str(), std::ios::in | std::ios::binary | std::ios::ate ); |