Article View: comp.sys.amiga.tech
Article #4630Wanted: Filelength() function
From: Anthon Pang
Date: Mon, 30 Jul 1990 03:43
Date: Mon, 30 Jul 1990 03:43
12 lines
953 bytes
953 bytes
I don't think there's a function that returns the filelength of a file, with
AmigaDOS. But I need an equivalent...how do you determine the length of a file
given only the file handle (eg from an Open)? There must be a way to find the
associated file lock, as one is created when the file is opened (shared /
exclusive)...right? Then you can Examine the FileInfoBlock and get the file's
length from the fibSize field.
ie size_t filelength(int handle)
I want a function that doesn't require knowing the filename...or do I need 2.0?
Thanks.
Technical Details
Message-ID:
<2671@mindlink.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!uunet!van-bc!rsoft!mindlink!a665Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!uunet!van-bc!rsoft!mindlink!a665 From: a665@mindlink.UUCP (Anthon Pang) Newsgroups: comp.sys.amiga.tech Subject: Wanted: Filelength() function Message-ID: <2671@mindlink.UUCP> Date: 30 Jul 90 03:43:44 GMT Organization: MIND LINK! - British Columbia, Canada Lines: 12