[Back to Interface] [Prev] [Next]

HXsetcreatedir/hxiscdir

intn HXsetcreatedir(char *dir)

dir IN:

Target directory of the external file to be written

Purpose

Initializes the directory environment variable, identifying the location of the external file to be written.

Return value

Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.

Description

The contents of dir is copied into the private memory of the HDF library. If dir is NULL, the directory variable is unset. If HXsetcreatedir encounters an error condition, the directory variable is not changed. When a new external element is created (via the routines HXcreate or SDsetexternal), the HDF library accesses the external file just like the open call by default. Refer to the Reference Manual page on HXcreate for a description of when a new or an old file should be opened.

Users may override the default action by calling HXsetcreatedir or by defining the environment variable $HDFEXTCREATEDIR. The HDF library will access the external file in the directory according to the environment variable setting. The precedence is HXsetcreatedir, then $HDXEXTDIR, in the manner of open.

Note that the above override does not apply to absolute pathnames - i.e., filenames starting with a forward slash. HDF will access the absolute pathname without change. Also note that HXsetcreatedir and $HDFEXTCREATEDIR are not symmetrical to HXsetdir and $HDFEXTDIR. The former pair permits only single directory values and is used to compose the filename for access. The later pair permits multiple directory values which are used for searching an existing file.

The dir_len parameter in the FORTRAN-77 routine specifies the length of the dir character string.

FORTRAN

integer function hxiscdir(dir, dir_len)

character*(*) dir

integer dir_len



[Back to Interface] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF Reference Manual - 07/29/98, NCSA HDF Development Group.