Date: Thu, 4 Sep 1997 13:11:50 -0800 (GMT) From: "Orlando A. Andico" To: Luke Steele cc: djgpp AT delorie DOT com Subject: Re: Determining size of file. In-Reply-To: <340dbe08.2566192@news.cableinet.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 3 Sep 1997, Luke Steele wrote: > Hi, > > I'm trying to convert a program I've written under DJGPP to run in a > UNIX enviroment using the gcc compiler. I thought there would be few > difficulties, but in fact I'm encountering quite a few, one of which > involves determining the size of a file. At the moment I'm using the > filelength function, but the UNIX compiler doesn't seem to support > this function. > > Does anyone know a (reasonably fast) way of determining the size of a > file under UNIX? fseek (fp, 0, SEEK_END); file_length = ftell (fp);