Opened 12 years ago
Last modified 8 years ago
#100 assigned new-feature
filename -- chmod code for filename
Reported by: | Fred T. Hamster | Owned by: | bugdock |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | feistymeow-nucleus | Version: | |
Keywords: | Cc: |
Description
add chmod to filename:
- we would have a use for file access modification.
- this bit is from value tagger.
- it would be good to have the read/write thing done as an enum that's platform independent.
#ifdef UNIX
chmod_value = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
#elif defined(WIN32)
chmod_value = _S_IREAD | _S_IWRITE;
#else
unknown. let's try unix...
chmod_value = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
#endif
int chmod_result = chmod(path.s(), chmod_value);
if (chmod_result) {
log(istring("there was a problem changing permissions on ") + path
+ "; writing the new version might fail.");
}
Note:
See TracTickets
for help on using tickets.