2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
5 POSIX function mkdir().
15 /*****************************************************************************
30 path - the path of the directory being created
31 mode - the permission flags for the directory
34 0 on success or -1 on errorr.
44 chmod(), stat(), umask()
48 ******************************************************************************/
54 if (!path
) /*safety check */
60 apath
= (char*) __path_u2a(path
);
64 /* Duplicate apath to avoid modifying function argument if !__upath */
65 apath
= strdup(apath
);
72 /* Remove possible trailing / to avoid problems in handlers */
73 if(strlen(apath
) > 0 && apath
[strlen(apath
)-1] == '/')
74 apath
[strlen(apath
)-1] = '\0';
76 lock
= CreateDir((STRPTR
) apath
);
81 errno
= IoErr2errno(IoErr());