Article View: comp.sys.amiga.tech
Article #9760Re: DOS questions
From: Chuck McManis
Date: Mon, 12 Sep 1988 16:13
Date: Mon, 12 Sep 1988 16:13
25 lines
1565 bytes
1565 bytes
In article <7066@well.UUCP> shf@well.UUCP (Stuart H. Ferguson) writes:
> Here's a weird question:
> ... given a DOS FileHandle (or filename or something) is there a way
> to tell if the file is seekable?
Well you could always try sending it an ACTION_SEEK (or whatever) packet
and see if it works. Or call Seek() and see if that works.
> Also, what happens if you try to seek on a pipe? An error? A Guru?
> Or does it work sometimes and not others?
Depends on the person writing the pipe. Most folks probably wouldn't
include the ability to seek since there is no meaning associated with
what it means to seek. Others might make up their own policies and go
for it.
In the IFF case since your "files" are nearly always going to be bigger
than a pipe buffer you will probably want to build the complete file in
memory and _then_ stuff it out through a pipe or what have you. Also it
makes for the ultimate in buffering and hence speed of output.
--Chuck McManis
uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses, but you knew that didn't you.
Technical Details
Message-ID:
<67822@sun.uucp>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!sun!pepper!cmcmanisReferences:
<7066@well.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga.tech Subject: Re: DOS questions Keywords: DOS seek IFF Message-ID: <67822@sun.uucp> Date: 12 Sep 88 16:13:52 GMT References: <7066@well.UUCP> Sender: news@sun.uucp Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 25