Documentation » ksh93r docs » Manual pages » man3 » modecanon.3
en

modecanon.3


Introduction to Library Functions                    MODECANON(3)

NAME
     modecanon - canonical file mode representation

SYNOPSIS
     #include <modex.h>

     int    modei(int external); int    modex(int internal);

DESCRIPTION
     POSIX threw out the file type bit macros and  replaced  them
     with  function-like macros that test file type.  This is bad
     in many ways, the worst of which is that it provides no  way
     for  a  user  program  to  synthesize file types in the mode
     bits.  pax(1), tar(1) and cpio(1) are examples of user  pro-
     grams  that must convert between the internal mode represen-
     tation and a private external  representation.   These  rou-
     tines  provide a canonical external representation with mac-
     ros to access  and  synthesize  the  bits  in  the  external
     representation.

     modei takes an external  mode  representation  external  and
     returns the equivalent internal representation.

     modex takes an internal  mode  representation  internal  and
     returns the equivalent external representation.

     The traditional bit access macro (S_ prefix changes  to  X_)
     are:   X_IFMT, X_IFSOCK, X_IFLNK, X_IFCTG, X_IFREG, X_IFBLK,
     X_IFDIR,  X_IFCHR,  X_IFIFO,  X_IPERM,   X_ISUID,   X_ISGID,
     X_ISVTX,   X_IRUSR,   X_IWUSR,  X_IXUSR,  X_IRGRP,  X_IWGRP,
     X_IXGRP, X_IROTH, X_IWOTH,  X_IXOTH,  X_IRWXU,  X_IRWXG  and
     X_IRWXO.  returns the type bits for mode.

SEE ALSO
     pax(1), stat(2)

SunOS 5.10                Last change:                          1


Generated by GNU enscript 1.6.4.

Tags:
Created by admin on 2009/10/26 12:14
Last modified by admin on 2009/10/26 12:14

Collectives

Project ksh93-integration Pages


XWiki Enterprise 2.7.1.34853 - Documentation