GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



next up previous contents
Next: Some Useful Programs Up: The LogicalFile Package Previous: Replicating LogicalFile Instances   Contents

Examining LogicalFile Instances

In addition to the above tricks, adding files, removing files, and replicating files, the application programmer can also inspect GATLogicalFile instances. In particular, an application programmer can obtain, from a GATLogicalFile instance, a list of the various GATFile this GATLogicalFile ``contains''. This is accomplished through a call to the function

GATResult
  GATLogicalFile_GetFiles(GATLogicalFile_const logfile,
    GATList_GATFile *files)

The first argument to this function is a GATLogicalFile instance. This instance is the one to be examined. The next argument is a GATList_GATFile. !!!. This passes back to the caller a list containing GATFile instances represented by the specified GATLogicalFile instance. This function returns a GATResult, covered in Appendix [*], which indicates the completion status of this function.

For the test drive this time we'll obtain a GATList_GATFile containing the GATFile instances in a GATLogicalFile instance logicalFile. The code for this is

GATResult result;
GATList_GATFile fileList;
GATLogicalFile logicalFile;

logicalFile = ...

result = GATLogicalFile_GetFiles( logicalFile, &fileList );

if( GAT_SUCCEEDED( result ) )
{
  /* The fileList is now populated with GATFile's */
}



Andre Merzky 2004-05-13