# NOTE: Derived from web_diary_dir/lib/TDS/Collection.pm.
# Changes made here will be lost when autosplit again.
# See AutoSplit.pm.
package TDS::Collection;

#line 146 "web_diary_dir/lib/TDS/Collection.pm (autosplit into web_diary_dir/lib/auto/TDS/Collection/Read.al)"
################################################################


sub Read ($;$)
{
    my ($self, $lm) = @_;

    my @files = $self->collect_files;

    return -1 if @files == 0;
    unless ($lm){                # 更新時刻の指定なし
	return scalar($self->read_files(@files));
    } else {
#	print "set: $lm, tdf: " . $self->last_modified . "\n";
	if ($self->last_modified > $lm){ # 指定された更新日より新しい
	    return  scalar($self->read_files(@files));
	} else {                         # 新しく更新された日記が無い
	    return 0;
	}
    }
}

# end of TDS::Collection::Read
1;
