ISROOTPATH(3)                  Library Routines                  ISROOTPATH(3)




NAME

       isRootPath - test for a full pathname


SYNOPSIS

       #include <gno/gno.h>

       int isRootPath (const char *name);


DESCRIPTION

       isRootPath tests the string name to see if it is the full specification
       of a path name to a file starting at the root of the file system.   Un‐
       der  GS/OS,  name is tested to see if it is a legal volume name, device
       name, or prefix.  Therefore, name is considered to be a  full  pathname
       when:

              It  starts  with  either  /  or : and is at least two characters
              long;

              It starts with either * or @ either by themselves or  preceeding
              a / or : character;

              It starts with a digit; or

              It  starts with .  and is followed by at least one other charac‐
              ter, where the next character is neither / nor :.


RETURN VALUES

       1 - name is a full path name.
       0 - name is not a full path name.


CAVEATS

       Note that no test for existence of the file is made; only the  validity
       of the file name is checked.

       With  GS/OS,  unlike the Unix filesystem, / is not recognised as a com‐
       plete file (or directory) name.  Therefore, isRootPath will return 0 if
       name is one character long and isn't * or @ or a digit.

       Under  GS/OS,  the  test is carried out independant of any mounted file
       systems, therefore only GS/OS rules are followed.  In particular, there
       is  no  JudgeName(3) call made, therefore no gaurantee is made that the
       filename will be valid for any given file system.


HISTORY

       This routine was originally called if_root_path and  was  part  of  the
       lenviron  library.  It was adapted from code in dmake(1) for GNO v2.0.3
       by Devin Reade in April 1994.  It was incorporated into the GNO libc as
       of v2.0.6.  dmake(1) was written by Dennis Vadura,



GNO                             30 January 1997                  ISROOTPATH(3)

Man(1) output converted with man2html