[Swift-devel] filesys_mapper doesnt take structured filenames

Michael Wilde wilde at mcs.anl.gov
Mon Nov 5 19:19:26 CST 2007


Ben, did you say that this mapper invocation *should* take directories? 
It doesnt seem to:

pcapfile pcapfiles[]<filesys_mapper; prefix="input/pc", suffix=".pcap">;

The full code is below. The program exits without finding anything.
The dir input/ is in my cwd when running swift and contains pc1.pcap 
thru pc5.pcap.

- Mike

UC64$ cat awf6.swift
type pcapfile;
type angleout;
type anglecenter;

(angleout ofile, anglecenter cfile) angle4 (pcapfile ifile)
{
   app { angle4 @ifile @ofile @cfile; }
}

pcapfile pcapfiles[]<filesys_mapper; prefix="input/pc", suffix=".pcap">;

angleout    of[] 
<structured_regexp_mapper;source=pcapfiles,match="input/pc(.*)\.pcap",transform="_output/of/of\1.angle">;
anglecenter cf[] 
<structured_regexp_mapper;source=pcapfiles,match="input/pc(.*)\.pcap",transform="_output/cf/cf\1.center">;

foreach pf,i in pcapfiles {
   (of[i],cf[i]) = angle4(pf);
}
UC64$

--
UC64$ pwd
/home/wilde/angle/data
UC64$ ls input
pc1.pcap  pc2.pcap  pc3.pcap  pc4.pcap  pc5.pcap
UC64$



More information about the Swift-devel mailing list