Path.lchown
void lchown(int uid, int gid) constLike chown but does not follow symlinks (operates on the link itself).
Platform semantics:
- POSIX: Uses
lchown(2)when available; otherwise attempts a best-effort
fallback via chown (documented to follow symlinks in that case).
- Windows: Not supported; this method throws an exception.
Parameters
uid | New user ID. Pass a negative value to leave unchanged. |
gid | New group ID. Pass a negative value to leave unchanged. |