[Swift-devel] [Bug 291] New: Add a exists() function to test for file existence

Michael Wilde wilde at mcs.anl.gov
Fri Apr 1 12:51:29 CDT 2011


Basically as far as I understand: the presence or absence of a particular data file within the inout dataset is to be used to determine whether the code to process that dataset subsection gets invoked or not:

  if (exists("extra.data")) {
     DataFile extraInput<"extra.data">;
     extraResult = analyze(extraInput);
  }

The above is my assumption based on a phone call.  We can and should verify the assumption with a simple example.

I also thought we can try this today by seeing if extraInput can be an array, mapped to zero items if nothing to do and 1 item if something to do.  That would at least let us test the use case.

John, can you verify if the example Swift lines above are what you are looking for here?

- Mike

----- Original Message -----
> On Fri, 2011-04-01 at 10:51 -0500, Michael Wilde wrote:
> 
> > - we should first verify that exists() will solve the NCAR need in a
> > sufficiently clean way
> 
> I think this is important. Can we get a description of the problem
> instead of a (otherwise) random proposal for a solution?

-- 
Michael Wilde
Computation Institute, University of Chicago
Mathematics and Computer Science Division
Argonne National Laboratory




More information about the Swift-devel mailing list