[Swift-user] __root__ in filename

Ketan Maheshwari ketan at mcs.anl.gov
Fri Dec 12 16:55:31 CST 2014


>
> The simplest approach is to just map one array to each file suffix. The
> filesys mapper will return the files in the same lexicographic order for
> each pattern:
>
> $ cat ./regexpmap3.swift
>
> type file;
>
> file data[]  <filesys_mapper; prefix="f", suffix=".dat">;
> file image[] <filesys_mapper; prefix="f", suffix=".img">;
>
> foreach j, i in data {
>    tracef(" data[%i] = %s\nimage[%i] = %s\n",
>           i, filename(data[i]),
>           i, filename(image[i]));
> }
>
> $ swift ./regexpmap3.swift
> Swift 0.95 RC5 swift-r7605 cog-r3874
> RunID: run078
> Progress: Wed, 10 Dec 2014 22:10:56+0000
>   data[2] = f3.dat
> image[2] = f3.img
>   data[3] = f4.dat
> image[3] = f4.img
>   data[0] = f1.dat
> image[0] = f1.img
>   data[1] = f2.dat
> image[1] = f2.img
> Final status:Wed, 10 Dec 2014 22:10:56+0000
>
>
After some more experiments it was determined that this does not hold true.
That is, independent filesys_mappers on a given directory will not pick the
files in the same order resulting in irregular combinations in the
resulting tuple.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20141212/005b1d8c/attachment.html>


More information about the Swift-user mailing list