Programming Guide



sm_fi_path

Returns the full path name of a file

char *sm_fi_path(char *file_name);

file_name
A pointer to the name of the file whose path is sought.

Returns

Description

sm_fi_path finds the full path name of a file. The file can be a screen or any other type of file. sm_fi_path returns a pointer to a static buffer that contains the file's full path name.

Panther searches for file_name in the current directory, then along the path given to sm_initcrt, and finally along the path defined by SMPATH.

If the file is found, the full path name is returned to the caller. Because the static buffer used to hold the full path name is shared by several functions, it should be used or copied immediately.

Example

char *file, *path;
...
if ((path = sm_fi_path(file)) == NULL)
sm_femsg(0, "Unable to find file");
else
sm_d_msg_line(path, INHERITED);
endif