ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/URL/URL_file.pm
Revision: 1.8
Committed: Mon Jul 31 15:44:49 2000 UTC (24 years, 9 months ago) by williamc
Content type: text/plain
Branch: MAIN
CVS Tags: ProtoEnd
Branch point for: HPWbranch
Changes since 1.7: +1 -1 lines
Log Message:
Convert to standardised URL class

File Contents

# 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_interface;
13 @ISA=qw(URL::URL_interface);
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 copy ( $filename,$location) || die "Unable to copy file $filename --> "
24 ."$location \n$!\n";
25 $rv=$location;
26 }
27 else {
28 #print "URL_file : Unable to find file $urlfile : $!\n";
29 $rv="";
30 }
31 return $rv;
32 }