38 static void recursive_timestamp(
const Pathname & dir_r, time_t & max_r )
40 std::list<std::string> dircontent;
44 for_( it, dircontent.begin(), dircontent.end() )
46 PathInfo pi( dir_r + *it, PathInfo::LSTAT );
49 if ( pi.mtime() > max_r )
51 recursive_timestamp( pi.path(), max_r );
57 friend Impl * rwcowClone<Impl>(
const Impl * rhs );
60 {
return new Impl( *
this ); }
74 RepoStatus::RepoStatus()
75 : _pimpl( new
Impl() )
79 : _pimpl( new
Impl() )
81 PathInfo info( path_r );
89 else if ( info.isDir() )
91 time_t t = info.mtime();
100 static const std::string magic(
"43" );
111 std::ifstream file( path_r.c_str() );
114 WAR <<
"No cookie file " << path_r << endl;
128 std::ofstream file(path_r.c_str());
143 {
return str << *obj.
_pimpl; }
151 else if ( rhs.
empty() )
156 std::string lchk( lhs.
_pimpl->_checksum );
157 std::string rchk( rhs.
_pimpl->_checksum );
158 stringstream ss( lchk < rchk ? lchk+rchk : rchk+lchk );
161 result.
_pimpl->_timestamp = std::max( lhs.
_pimpl->_timestamp, rhs.
_pimpl->_timestamp );
167 {
return lhs.
_pimpl->_checksum == rhs.
_pimpl->_checksum; }