Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6e0c953b

Von Jan Büren vor etwa 1 Monat hinzugefügt

  • ID 6e0c953b84ca7b63c65ff1432ce35c83c8a24cf0
  • Vorgänger 72e4f6a7
  • Nachfolger c17045ff

FileVersion: Funktion für Test und Speicherort im Dateisystem

Unterschiede anzeigen:

SL/DB/FileVersion.pm
10 10

  
11 11
__PACKAGE__->meta->initialize;
12 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

  
13 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

Auch abrufbar als: Unified diff