same_file

same_file(a: unicode, b: unicode) bool

Return true if the two document paths are pointing the same filesystem file.

Files do not have to exist for the test to succeed. Path are expended, converted in an absolute, normalized form before to be compared. Testing two different paths resolved in the same file through symbolic links will return false. same_file(“/a”, “\aa”) == true same_file(“/a”, “/a/”) == true same_file(“/a”, “//a”) == true same_file(“/a/b/../c”, “/a/c”) == true same_file(“/a/b/../c”, “/a/c”) == true same_file(“/A”, “/a”) == true // on Windows same_file(“/A”, “/a”) == false // on Linux same_file(“/a”, “/b”) == false // With “a” pointing to “b” through a symbolic link

Return type

bool