AFAIK, files in a file system are uniquely identified by their fully
qualified path, as you cannot have the same file name/extension multiple
times in a directory.
From within C#, when you instantiate the StreamReader or StreamWriter
classes, for example, you connect your instance to a unique entity on the
file system, either by hard coding the file name and path (as necessary) or
by allowing the user to select a file via a file open common dialog, then
using the selection as the argument for the constructor.
AFAIK, files in a file system are uniquely identified by their fully
qualified path, as you cannot have the same file name/extension multiple
times in a directory.
But you can have multiple paths to the same file because of hard links
and junction points. So two paths differing doesn't imply that they in
fact represent different files.
To check if two different file paths actually refer to the same file
you can open them both, call GetFileInformationByHandle and then
compare the BY_HANDLE_FILE_INFORMATION.dwVolumeSerialNumber,
..nFileIndexLow and .nFileIndexHigh values.