Hi guys I just wanna ask what is the difference between the mode_t and st_mode when using sys/stat.h and sys/types.h libraries. I looked them up google and find most people use st_mode but never mode_t.
number87
0
Junior Poster in Training
Recommended Answers
Jump to PostHi guys I just wanna ask what is the difference between the mode_t and st_mode when using sys/stat.h and sys/types.h libraries. I looked them up google and find most people use st_mode but never mode_t.
The mode_t is a type alias. The st_mode is a name of the struct stat …
Jump to Post> because if this is the situation, and I implement a strtok or strchr to check the string for d,w,r,x what if the filename is also dwrxdwrx?
Er, because the permissions are always in field 3, and the filename is always in field 7 (or whatever your 'ls' generates)…
All 7 Replies
ArkM
1,090
Postaholic
number87
0
Junior Poster in Training
number87
0
Junior Poster in Training
Salem
5,138
Posting Sage
number87
0
Junior Poster in Training
Salem
5,138
Posting Sage
number87
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.