true if both refer to the same file object; false otherwise.bool sameOpenFile(int fd1, int fd2)Returns true if two open files refer to the same underlying file object.
This is an equivalent of Python's os.path.sameopenfile.
Platform semantics:
st_dev and st_ino obtained via fstat(2) on bothfile descriptors.
FILE* pointers identity whenusing the File overload. The fd-based overload returns false as a conservative answer. This limitation is documented; a future task may implement proper identity using Win32 APIs.
fd1 | First open file descriptor. |
fd2 | Second open file descriptor. |
true if both refer to the same file object; false otherwise.