[aclug-L] C questions
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I'm trying to create a directory in C where I use
mkdir(const char *pathname, mode_t mode);
I'd like to take a simple string "0775" and somehow
use that for the mode argument. I'm getting the
permissions as a char string from a file. Now, if you
do this:
mkdir ("mydir", 0755); /* 0755 directly typed in */
It works fine. But I can't figure out how to get a
variable (char or otherwise) with 0755 in it that
mkdir will accept. Of course I could parse each letter
and build the variable, but that just isn't very
elegant.
I'm also trying this for utime(), i.e., trying to feed
the utimbuf argument to utime from a string I'm
getting from a file.
LB
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-- This is the discussion@xxxxxxxxx list. To unsubscribe,
visit http://www.complete.org/cgi-bin/listargate-aclug.cgi
- [aclug-L] Re: Win4Lin Pro, Ryan, 2006/03/01
- [aclug-L] Re: Win4Lin Pro, Olwe Bottorff, 2006/03/01
- [aclug-L] Re: Win4Lin Pro, Ryan, 2006/03/01
- [aclug-L] Re: Win4Lin Pro, Jeff Vian, 2006/03/01
- [aclug-L] C questions,
Olwe Bottorff <=
- [aclug-L] Re: C questions, Jonathan Hall, 2006/03/12
- [aclug-L] Re: C questions, Olwe Bottorff, 2006/03/12
- [aclug-L] Re: C questions, Tom Hull, 2006/03/12
- [aclug-L] Re: C questions, Jonathan Hall, 2006/03/12
- [aclug-L] C/C++ question, Olwe Bottorff, 2006/03/28
- [aclug-L] Re: C/C++ question, Tom Hull, 2006/03/28
|
|