From: "Berger, Daniel" Date: 2002-08-01T21:23:09+09:00 Subject: RE: A very basic tail -f implementation > -----Original Message----- > From: James F.Hranicky [mailto:jfh@cise.ufl.edu] > Sent: Wednesday, July 31, 2002 3:50 PM > To: ruby-talk@ruby-lang.org > Subject: Re: A very basic tail -f implementation > > > On Wed, 31 Jul 2002 21:02:04 +0900 > Florian Frank wrote: > > > I could try to document a little more in the best english > I'm capable > > of. That is, it will probably be quite awful. ;) > > A couple of suggestions: > > - Check for rotation by checking for changes in the inode number This is proving difficult in practice because, as the Pickaxe says, the File::Stat info is recorded at the moment the File::Stat object is created; changes made to the file after that point will not be reflected. This applies to filehandles as well, as experimentation has shown. Simply calling the class method won't work either because that requires the filename which, by that point, has already changed. If I'm doing something wrong, I'd love to know how to make this work! > > - Allow tailing from arbitrary points in the file by lines, e.g Heh - funny you should mention it. I already submitted a very similar approach to Florian. :) Regards, Dan