diff options
| author | fukachan <fukachan> | 2002-03-30 13:48:25 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-03-30 13:48:25 +0000 |
| commit | eed4d6079b291be8b66e2e4d2dd1bed1cdd6e8e1 (patch) | |
| tree | d8314ae7b40d97d8ff76e08047caeee204cdd559 /fml/lib/FML/Article.pm | |
| parent | a6f4e86f12bdc4714d4f7be6adbce43a1590189e (diff) | |
| download | fml8-eed4d6079b291be8b66e2e4d2dd1bed1cdd6e8e1.tar.gz fml8-eed4d6079b291be8b66e2e4d2dd1bed1cdd6e8e1.tar.bz2 fml8-eed4d6079b291be8b66e2e4d2dd1bed1cdd6e8e1.zip | |
FML::Article::filepath() determines the article file path.
Diffstat (limited to 'fml/lib/FML/Article.pm')
| -rw-r--r-- | fml/lib/FML/Article.pm | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/fml/lib/FML/Article.pm b/fml/lib/FML/Article.pm index ae3c9081..0954e989 100644 --- a/fml/lib/FML/Article.pm +++ b/fml/lib/FML/Article.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Article.pm,v 1.29 2002/01/16 13:33:58 fukachan Exp $ +# $FML: Article.pm,v 1.30 2002/01/16 13:43:19 fukachan Exp $ # package FML::Article; @@ -161,8 +161,7 @@ sub spool_in mkpath( $spool_dir, 0, 0700 ); } - use File::Spec; - my $file = File::Spec->catfile($spool_dir, $id); + my $file = $self->filepath($curproc, $id); use FileHandle; my $fh = new FileHandle; @@ -181,6 +180,33 @@ sub spool_in } +=head2 filepath($curproc, $id) + +return article file path. + +=cut + + +# Descriptions: return article file path. +# Arguments: OBJ($self) OBJ($curproc) NUM($id) +# Side Effects: none +# Return Value: STR(file path) +sub filepath +{ + my ($self, $id) = @_; + my $curproc = $self->{ curproc }; + my $config = $curproc->{ config }; + my $spool_dir = $config->{ spool_dir }; + + use File::Spec; + my $file = File::Spec->catfile($spool_dir, $id); # ok. + + Log("debug: spooled path = $file"); + + return $file; +} + + =head2 speculate_max_id($spool_dir) scan the spool_dir and get max number among files in it It must be the |
