The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Apache::CVS::File - class that implements a versioned file

SYNOPSIS

 use Apache::CVS::RcsConfig();
 use Apache::CVS::File();
 use Apache::CVS::Revision();

 $versioned_file = Apache::CVS::File->new($path, $rcs_config);
 $name = $versioned_file->name();
 $path = $versioned_file->path();
 $num_revisions = $versioned_file->revision_count();

 $revision_one = $versioned_file->revision('first');
 $revision_two = $versioned_file->revision('next');
 $revision_first = $versioned_file->revision('1.1');

DESCRIPTION

The Apache::CVS::File class implements a typical CVS file.

Apache::CVS::File->new($path, $rcs_config)

Construct a new Apache::CVS::File object. The first argument is the full path of the file. The second is a RCS configuration object.

$versioned_file->rcs()

Get an Rcs object associated with this file.

$versioned_file->path([$new_path])

Get or set the path of this file.

$versioned_file->revisions()

Returns a reference to a list of Apache::CVS::Revision objects in no particular order.

$versioned_file->revision($index)

Returns a Apache::CVS::Revision object for the given index. The index can be an absolute revision number (1.1, 1.2, 1.3.2.4) or one of the following: first, next, prev, last. Using the 'next' index on the first invocation of this method result in the same thing as using 'first'. Similarly using 'prev' on the first invocation is the same and using 'last'. If no revision can be found, the method will return undef.

$versioned_file->revision_count()

Returns the number of revision associated with this file.

$versioned_file->name()

Returns the filename of this file.

SEE ALSO

Apache::CVS, Apache::CVS::File, Apache::CVS::Revision, Apache::CVS::RcsConfig

AUTHOR

John Barbee <barbee@veribox.net>

COPYRIGHT

Copyright 2001-2002 John Barbee

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.