Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cbmvax!jesup From: jesup@cbmvax.commodore.com (Randell Jesup) Newsgroups: comp.sys.amiga.programmer Subject: Re: Message-ID: <19098@cbmvax.commodore.com> Date: 19 Feb 91 05:05:41 GMT References: <1991Feb18.082650@Informatik.TU-Muenchen.DE> Reply-To: jesup@cbmvax.commodore.com (Randell Jesup) Organization: Commodore, West Chester, PA Lines: 24 In article <1991Feb18.082650@Informatik.TU-Muenchen.DE> vollath@lan.informatik.tu-muenchen.de (Ulrich Vollath) writes: >I am sure, someone has already solved the following problem: >For an implementation of un*x fstat(), i have to do an Examine() >on a filehandle (NOT a struct FileLock *). > >So how can I convert filehandles to filelocks (under AmigaDOS 1.3) >or examine the properties of a file associated to a filehandle >directly ? Under 2.0, you can just use ExamineFH(). Under 1.3, it can't be done. Period. Sorry. (This is why there's now an ExamineFH()...) If you can somehow remember the string used to open it, you can get the info that way (Lock() it and examine, but that will fail if the ope is exclusive, or strip the last portion of the path, lock the parent, and then ExNext through the parent until you come to the file. That works even if the file is exclusively locked.) -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com BIX: rjesup The compiler runs Like a swift-flowing river I wait in silence. (From "The Zen of Programming") ;-)