On Fri, 26 Mar 1999 [EMAIL PROTECTED] wrote:

# The syntax for mkdir is :
# 
#   #include <sys/mode.h>
#   #include <sys/stat.h>
#   
#   int mkdir (Path, Mode)
#   const char *Path;
#   mode_t Mode;
# 
# I don't understand the mode_t structure. Can somebody mail me an example of
# how to use this function in a C-program ?

it's a number that represents the file permissions. 0600 and things like that.
'man chmod' for more info

to use mkdir just do:

mkdir ("some/path", 0755);

this would create a directory with -rwxr-xr-x permissions. Don't forget
directories must have execute permission.

-- 
+++      If at first you don't succeed, you must be a programmer     +++
[EMAIL PROTECTED]     http://www.users.globalnet.co.uk/~kermit

Reply via email to