Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!nosc!ucsd!ucsdhub!jack!nusdhub!rwhite From: rwhite@nusdhub.UUCP (Robert C. White Jr.) Newsgroups: comp.unix.wizards Subject: Re: Getting the pathname from a FILE*. Message-ID: <1101@nusdhub.UUCP> Date: 12 Jul 88 22:52:12 GMT References: <651@umb.umb.edu> Organization: National University, San Diego Lines: 21 in article <651@umb.umb.edu>, karl@umb.umb.edu (Karl Berry.) says: > The title says it all. Am I missing something obvious? > The pathname doesn't seem to be a field in either the > _iobuf or the structure returned by stat. > ttyname or ctermid will give you the pathname > of your terminal, but I want the pathname of an > arbitrary FILE* I have fopen. Or am I missing some > reason why this is not feasible? At great risk of being wrong... Since one i-node may have many file names I think that the individual file name is disposed of as useless after the object in question is opened. The closest I can even picture you getting is to retreive the inode number. All else would seem to be un-workable. Rob. Disclaimer: Then again, maby not.