Working on converting an old app of mine to Cocoa and have this code that tests if two files are equal. Analyzing the project I am told that MacDirID is deprecated. Anyone have suggestions on how to test if two folderitems are referencing the same file on disk. This is for OS X only.
equals(Extends f As FolderItem, g As FolderItem) As Boolean // this method is passed two folderitems. it returns true if the two folderitems // refer to the same file/folder and false if they don't if f = nil or g = nil then Return false else Return (f.MacVRefNum = g.MacVRefNum and f.MacDirID = g.MacDirID and f.Name = g.Name) end if End Function
I will happily take a reference to something in MBS to do this, if there is one; and, I will also happily take any non-MBS code that will test if two folderitems point to the same file on disk in OS X.