TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: Neil Heller
from: andrew clarke
date: 2003-07-22 13:29:12
subject: Creating a directory

Sun 2003-07-20 13:53, Neil Heller (1:106/2000) wrote to All:

 NH> Is there a "standard" way of dealing with directory creation?

This is from the mkdir(2) man page in FreeBSD.  See "standards"
below.  Most UNIX-like operating systems will have an identical function. 
DOS/OS2/Windows compilers may differ though (usually omitting the mode
argument entirely), ie. they may not conform to the POSIX standard.

SYNOPSIS
     #include 
     #include 

     int mkdir(const char *path, mode_t mode);

DESCRIPTION
     The directory path is created with the access permissions specified by
     mode and restricted by the umask(2) of the calling process.

     The directory's owner ID is set to the process's effective user ID.  The
     directory's group ID is set to that of the parent directory in which it
     is created.

RETURN VALUES
     The mkdir() function returns the value 0 if successful; otherwise the
     value -1 is returned and the global variable errno is set to indicate the
     error. 

[...]

STANDARDS
     The mkdir() function call is expected to conform to ISO/IEC 9945-1:1990
     (``POSIX.1'').

-- mail{at}ozzmosis.com

--- timEd/FreeBSD 1.11.b1
* Origin: Blizzard of Ozz, Mt Eliza, Melbourne, Australia (3:633/267)
SEEN-BY: 633/267 270
@PATH: 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.