Path.owner

string owner() const

Gets the owner username of the file (POSIX only).

Returns

The owner's username, or an empty string on Windows or error.