Revision: | 1.11 |
Committed: | Tue Nov 28 15:21:13 2000 UTC (24 years, 5 months ago) by williamc |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | V0_19_5, SFATEST, V0_19_4, V0_19_4_pre3, V0_19_4_pre2, V0_19_4_pre1, V0_19_3, V0_19_2, V0_19_1, V0_19_0, V0_18_5, V0_18_4, V_18_3_TEST, VO_18_3, V0_18_2 |
Branch point for: | V0_19_4_B |
Changes since 1.10: | +0 -1 lines |
Log Message: | remove printout |
# | Content |
---|---|
1 | # |
2 | # standard url interface for local file |
3 | # |
4 | # Interface |
5 | # --------- |
6 | # new() : |
7 | # get(url, destination) : |
8 | |
9 | package URL::URL_file; |
10 | require 5.001; |
11 | use File::Copy; |
12 | use URL::URL_base; |
13 | @ISA=qw(URL::URL_base); |
14 | |
15 | sub get { |
16 | my $self=shift; |
17 | my $url=shift; |
18 | my $location=shift; |
19 | |
20 | my $filename=$url->path(); |
21 | #print $filename; |
22 | if ( -e $filename ) { |
23 | if ( -d $filename ) { #- directory copy |
24 | require Utilities::AddDir; |
25 | AddDir::copydir($filename,$location); |
26 | } |
27 | else { |
28 | copy ( $filename,$location) || die "Unable to copy file $filename --> " |
29 | ."$location \n$!\n"; |
30 | } |
31 | $rv=$location; |
32 | } |
33 | else { |
34 | #print "URL_file : Unable to find file $urlfile : $!\n"; |
35 | $rv=""; |
36 | } |
37 | return $rv; |
38 | } |