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:

  1. we would have a use for file access modification.
  2. this bit is from value tagger.
  3. 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.");

}

Change History (1)

comment:1 by Fred T. Hamster, 8 years ago

Owner: changed from Fred T. Hamster to bugdock
Status: newassigned
Note: See TracTickets for help on using tickets.