GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  FILEPATH (3)

[Include document man1/alc_contents.mac]

   filepath    filepath

NAME

filepath - return the whole search path of a file

[Include document man1/alc_origin.1]

CONTENTS

Synopsys
Parameters
Description
Return Value
Example
See Also

SYNOPSYS






#include "mut.h"
char *filepath(name, extension)
char *name, *extension;


PARAMETERS

name Name of the file to be search for
extension File extension

DESCRIPTION

filepath return the absolute path of a cell. This is useful for error messages, since the caller of mbk file functions is not able to specify explicitly which file it opened. Having such an information is also necessary when last modification times or access times are needed, as for consistency checks. The file is searched through the environment variable MBK_WORK_LIB(1), and if not found, through MBK_CATA_LIB(1) in the user defined order.
The file to be searched is called name.extension, if extension is not NULL, else it is name. If extension is the empty string, "", then the file name will be name. .

RETURN VALUE

filepath returns NULL on failure, ie the file is not in the pathes, or the absolute path on success. The value returned, when not NULL, is stored in a static buffer, so this values is to use at return time or copied into a user buffer.

EXAMPLE






#include <stdio.h>
#include "mut.h"
#include "mph.h"
void vti_error(fig, error)
phfig_list *fig;
char *(*error)();
{
      fprintf(stderr, "Syntax error in %s\n", filepath(fig->NAME, "cp"));
      fprintf(stderr, "%s\n", error());
}


SEE ALSO

mbk(1), MBK_WORK_LIB(1), MBK_CATA_LIB(1), mbkfopen(3). mbkunlink(3).

[Include document man1/alc_bug_report.1]

Search for    or go to Top of page |  Section 3 |  Main Index


ASIM/LIP6 FILEPATH (3) October 1, 1997

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.