| Apache-CVS documentation | Contained in the Apache-CVS distribution. |
Apache::CVS::PlainFile - class that implements a file in CVS
use Apache::CVS::PlainFile(); $file = Apache::CVS::PlainFile->new($path); $path = $file->path(); $name = $file->name();
The Apache::CVS::PlainFile class implements a base file that resides in a CVS
repository. A versioned file is implemented by the class
Apache::CVS::VersionPlainFile.
Construct a new Apache::CVS::PlainFile object with the given path.
Returns the full path of this file.
Returns just the filename of this file.
John Barbee <barbee@veribox.net>
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.
| Apache-CVS documentation | Contained in the Apache-CVS distribution. |
# $Id: PlainFile.pm,v 1.2 2002/04/23 04:19:05 barbee Exp $
package Apache::CVS::PlainFile; use strict; $Apache::CVS::PlainFile::VERSION = $Apache::CVS::VERSION;
sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = {}; $self->{path} = shift; bless ($self, $class); return $self; }
sub path { my $self = shift; $self->{path} = shift if scalar @_; return $self->{path}; }
sub name { my $self = shift; $self->{path} =~ m#\/([^\/]*)$#; return $1; }
1;