From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,372ebe42676183e0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-05 08:48:43 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!gatech!paladin.american.edu!auvm!J64.STRATCOM.AF.MIL!BennettC Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU Newsgroups: comp.lang.ada Encoding: 28 TEXT X-Mailer: Microsoft Mail V3.0 Message-ID: <2EE35B0F@SMTPGATE2.STRATCOM.AF.MIL> Date: Mon, 5 Dec 1994 10:27:00 PST Sender: Ada programming language From: "Bennett, Chip (KTR) ~U" Subject: Re: Filename comparison ... HELP NEEDED! Comments: cc: Nigel Jewell Date: 1994-12-05T10:27:00-08:00 List-Id: In comp.lang.ada you wrote > Does anybody know of an good solution to seeing if two filenames given actually > point at the same file in the file system? (Probably a solution in C). You could use stat or lstat to get info about a file that is the same (file system and inode number) even if the aliases for the file are different. Your choice of stat or lstat depends on whether you want symbolic links to act like "different" files or not. Also, this can be easily done in Ada using the system interface package provided with the compiler. If your compiler doesn't have a UNIX system interface package (most do), the bindings to stat and lstat and the conversion of the "C" data structure to Ada is also straight forward. I agree with another response to this post, that it was inappropriate for you to splatter the news groups with this question. However, I think I saved your good name in THIS group by pointing out the "Ada" aspects. :-) ***************************************************************** * Chip Bennett, GDE Systems Inc | BennettC@j64.stratcom.af.mil * * USSTRATCOM/J64213 | Voice (402)294-7360 * * 901 SAC Blvd, Suite 2B24 | FAX (402)294-7912 * * Offutt AFB, NE 68113-6600 | Proud member of Team Ada * * Opinions expressed here are my own _so_, TTFWTW * *****************************************************************