pub fn parse_mode(mode_str: &str, current_mode: u32) -> Result<u32, String>Expand description
Parse a mode string (octal or symbolic) and return the new mode.
mode_str can be:
- Octal: “755”, “0644”
- Symbolic: “u+x”, “g-w”, “o=r”, “a+rw”, “u=rw,g=r,o=”, “+t”, “u+s”
- Combined: “u+rwx,g+rx,o+r”
current_mode is the existing file mode, needed for symbolic modes.