Load information from the specified path

saf_readInfo_path is a function defined in info.c.

Synopsis:

SAF_PathInfo saf_readInfo_path(const char *path, int independent)

Formal Arguments:

  • path: [IN] path of a file to get the info for
  • independent: [IN] A flag for independent operation. If non-zero, perform the work and return the results only on the calling processor. Otherwise, this function must be called collectively by all processors in the communicator used to init the SAF library. In other words, call this function from one processor with a non-zero value for this argument or call it an all processors with a zero argument on all processors. Note also that if this call is made independently, then all succeeding calls involving the returned SAF__PathInfo object must be made independently and by the same processor.

Description: This function is used to query a file in the filesystem to obtain information about it. The information is returned in the SAF__PathInfo object. Once this object is obtained, one can query a number of things about the database using various query functions. Once you are done, remember to free the resources with saf_freeInfo_path.

Note that any path, except NULL, is acceptable to pass here. This function will obtain as much information about the specified path as possible. If the path either does not exist or the user does not have permission to read it, that fact can be obtained from saf_getInfo_permissions. Likewise, if the path does exist, is readable and is a SAF database, the particular version information, etc. can be obtained from functions like saf_getInfo_libversion, etc. A variety of failure modes are detectable by calling various functions in this part of the interface to learn about the kind of file to which path refers.

Preconditions:

  • Path must be non-NULL. (low-cost)

Parallel Notes: Independent semantics only

See Also: