Right now we have std.os.renameat which actually has quite good portability but is in the posix abstraction layer of the standard library. We're missing a higher level abstraction, e.g. in std.fs.Dir or even std.fs itself.
Note that std.fs.rename/std.fs.renameZ/std.fs.renameW already exist (they are just aliases for their std.os.rename counterparts). renameat is not exposed in std.fs, though.
Those should be given proper doc comments and renamed to renameAbsolute etc to follow the pattern of the other functions.
Note also that os.renameat takes fds but the rest of the fs API you are passing around Dir and File
Will have a PR for this later today most likely.