HTCondor Project List Archives



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-devel] same_file util function?




I want to use it for recursively handling LOCAL_CONFIG_FILE, and to
use it to avoid cycles. I'd rather check to see if they're the same file
instead of doing a strcmp (or stricmp) on the filename, since that's not
particularly great.


On unix I'd probably just look at the file and check it's device and inode number, which is probably Good Enough(tm), but I have no idea what
I'd do on Win32.


I'd hazard a guess that you could get the UNC paths and volume serial numbers and compare those. I may be forgetting some corner cases that Matt already thought of though.

See GetFileInformationByHandle() and WNetGetUniversalName() if you want.

Colin