Function : OS File

OSPathNetParse - Breaks pathname into port, server, and file names.
----------------------------------------------------------------------------------------------------------

#include <osfile.h>

STATUS LNPUBLIC OSPathNetParse(
const char far *PathName,
char far *retPortName,
char far *retServerName,
char far *retFileName
);

Description :

Given a fully-qualified network path specification to a Domino database file, this function breaks it into its port name, server name, and filename components. If the fully-qualified path contains just the port name and/or server name components, then they will be the only ones returned.

You may obtain an expanded pathname by passing a valid DBHANDLE to NSFDbPathGet. NSFDbPathGet returns the Expanded pathname of the open database. You may then pass the expanded path name to OSPathNetParse to obtain the port name, server name and filename components. You may use these components to construct a full path specification to a different Domino database on the same server, via the same port, simply by substituting a new filename in a call to OSPathNetConstruct.

Expanded database filepath syntax:

{Port} NetworkSeparator {servername} ServerSuffix {filename}
COM1{NetworkSeparator}NOTESBETA{ServerSuffix}NOTEFILE\APICOMMS.NSF

Note: the NetworkSeparator and ServerSuffix are not system independent. To maintain the portability of your code, it is recommended that you make no explicit use of them anywhere in you programs.


Parameters :

Sample Usage :

/* Parse the fully qualified database pathname in to components*/

  if (error_status = OSPathNetParse(db_fullpath, port_name,
                                    server_name, file_name))
      goto Exit;


See Also :

NSFDbOpen
----------------------------------------------------------------------------------------------------------