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

John Dennis dennis at ucar.edu
Tue Apr 5 10:59:23 CDT 2011


Justin,

	Thanks for adding this feature.  I not currently setup on a system  
with the swift trunk.  I suspect Sheri is currently work
with the trunk.  Sheri, could you take a look at this feature during  
your work with swift?

Thanks,
John

On Apr 3, 2011, at 3:56 PM, Justin M Wozniak wrote:

>
> Ok, John, you can give this a try in trunk if you like.  The syntax  
> for the built-in is @exists, it takes a string and returns a boolean.
> 	Justin
>
> On Sat, 2 Apr 2011, Justin M Wozniak wrote:
>
>>
>> I have a prototype of this, I'll get it checked in later today.
>> 	Justin
>>
>> On Fri, 1 Apr 2011, John Dennis wrote:
>>
>>> Michael,
>>>
>>> 	This type of function would be great to have.
>>> John
>>> On Apr 1, 2011, at 11:51 AM, Michael Wilde wrote:
>>>> 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
>>> _______________________________________________
>>> Swift-devel mailing list
>>> Swift-devel at ci.uchicago.edu
>>> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
>>
>>
>
> -- 
> Justin M Wozniak




More information about the Swift-devel mailing list