kivitendo/SL/DB/FileVersion.pm @ c686c24f
a454ccd7 | Jan Büren | # This file has been auto-generated only because it didn't exist.
|
||
# Feel free to modify it at will; it will not be overwritten automatically.
|
||||
package SL::DB::FileVersion;
|
||||
use strict;
|
||||
use SL::DB::MetaSetup::FileVersion;
|
||||
use SL::DB::Manager::FileVersion;
|
||||
__PACKAGE__->meta->initialize;
|
||||
6e0c953b | Jan Büren | |||
sub get_system_location {
|
||||
my ($self) = @_;
|
||||
my $filesystem_file = $self->doc_path . $self->file_location;
|
||||
die "Invalid state, file has vanished at: $filesystem_file" unless -f $filesystem_file;
|
||||
return $filesystem_file;
|
||||
}
|
||||
sub file_name {
|
||||
my ($self) = @_;
|
||||
return $self->file->file_name;
|
||||
}
|
||||
a454ccd7 | Jan Büren | 1;
|
||
6e0c953b | Jan Büren | |||
__END__
|
||||
=pod
|
||||
=head1 NAME
|
||||
SL::DB::FileVersion
|
||||
=head1 FUNCTIONS
|
||||
=over 4
|
||||
=item C<get_system_location>
|
||||
Returns the filesystem's file location for this exact version.
|
||||
Dies if no plain file exists at the expected location.
|
||||
=item C<file_name>
|
||||
Shortcut for $self->file->file_name.
|
||||
=back
|
||||
=head1 AUTHOR
|
||||
Jan E<lt>jan@kivitendo.deE<gt>
|
||||
=cut
|