Path.chown
void chown(int uid, int gid) constChanges the file's owner user ID and/or group ID.
Platform semantics:
- POSIX: Uses
chown(2)which follows symlinks (acts on the target). - Windows: Not supported; this method throws an exception.
Parameters
uid | New user ID. Pass a negative value to leave unchanged (mapped to (uid_t)-1 where supported). |
gid | New group ID. Pass a negative value to leave unchanged (mapped to (gid_t)-1 where supported). |