/[MITgcm]/mitgcm.org/devel/buildweb/pkg/swish-e/prog-bin/file.pl
ViewVC logotype

Annotation of /mitgcm.org/devel/buildweb/pkg/swish-e/prog-bin/file.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1.1.1 - (hide annotations) (download) (vendor branch)
Fri Sep 20 19:47:30 2002 UTC (22 years, 10 months ago) by adcroft
Branch: Import, MAIN
CVS Tags: baseline, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
Importing web-site building process.

1 adcroft 1.1 #!/usr/local/bin/perl -w
2     use strict;
3    
4     # This is a short example that basically does the same
5     # thing as the default file system access method
6    
7     # This will index only one directory (the current directory)
8     # See the more advanced example DirTree.pl in the swish-e prog-bin directory.
9    
10    
11     my $dir = '.';
12     opendir D, $dir or die $!;
13     while ( $_ = readdir D ) {
14     next unless /\.htm$/;
15     my ( $size, $mtime ) = (stat "$dir/$_" )[7,9];
16     open FH, "$dir/$_" or die "$! on $dir/$_";
17    
18     print <<EOF;
19     Content-Length: $size
20     Last-Mtime: $mtime
21     Path-Name: $dir/$_
22    
23     EOF
24     print <FH>;
25     }
26    
27    
28    
29    

  ViewVC Help
Powered by ViewVC 1.1.22