]> wagnertech.de Git - mfinanz.git/blob - SL/DB/FileVersion.pm
date error in mapping
[mfinanz.git] / SL / DB / FileVersion.pm
1 # This file has been auto-generated only because it didn't exist.
2 # Feel free to modify it at will; it will not be overwritten automatically.
3
4 package SL::DB::FileVersion;
5
6 use strict;
7
8 use SL::DB::MetaSetup::FileVersion;
9 use SL::DB::Manager::FileVersion;
10
11 __PACKAGE__->meta->initialize;
12
13
14 sub get_system_location {
15   my ($self) = @_;
16
17   my $filesystem_file = $self->doc_path . $self->file_location;
18
19   die "Invalid state, file has vanished at: $filesystem_file" unless -f $filesystem_file;
20
21   return $filesystem_file;
22
23 }
24
25 sub file_name {
26   my ($self) = @_;
27
28   return $self->file->file_name;
29
30 }
31
32 1;
33
34 __END__
35
36 =pod
37
38 =head1 NAME
39
40 SL::DB::FileVersion
41
42 =head1 FUNCTIONS
43
44 =over 4
45
46 =item C<get_system_location>
47
48 Returns the filesystem's file location for this exact version.
49 Dies if no plain file exists at the expected location.
50
51 =item C<file_name>
52
53 Shortcut for $self->file->file_name.
54
55
56 =back
57
58 =head1 AUTHOR
59
60 Jan E<lt>jan@kivitendo.deE<gt>
61 =cut