Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Aug 2001 19:27:54 -0400
From:      Matthew Hagerty <mhagerty@voyager.net>
To:        freebsd-hackers@freebsd.org
Subject:   To determine if a file has grown?
Message-ID:  <5.1.0.14.2.20010827185351.01ba3aa8@pop.voyager.net>

next in thread | raw e-mail | index | archive | help
Greetings,

Is there a fast and/or efficient way to determine if a file size has 
changed without reopening the file every time?  I'm writing a program that 
needs to open a file and watch it to see when data gets written to the file 
(from an external source or another part of the same program), then read 
the data to process it.  I was looking at stat() but I've read that it is a 
high overhead function.  Any insight would be greatly appreciated.

Thanks,
Matthew


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.0.14.2.20010827185351.01ba3aa8>