🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #11354

Re: How to find out whether a file is a directory?

#11354
From: Michael "Ford" Ditto
Date: Mon, 06 Feb 1989 20:21
15 lines
1145 bytes
In article <9048@megaron.arizona.edu> cjeffery@arizona.edu (Clinton Jeffery) writes:
>Is there an easy way to find out if a filename refers to a directory
>in Aztec C?

Use the Examine() function, and look at the fib_DirEntryType field of
the FileInfoBlock.  If it is positive then the given filename is a
directory, and you can then repeatedly call ExNext() on the same
FileInfoBlock to discover the files it contains.
-- 
					-=] Ford [=-

"The number of Unix installations	(In Real Life:  Mike Ditto)
has grown to 10, with more expected."	ford@kenobi.cts.com
- The Unix Programmer's Manual,		...!sdcsvax!crash!elgar!ford
  2nd Edition, June, 1972.		ditto@cbmvax.commodore.com
Technical Details
Message-ID: <5907@cbmvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cbmvax!ditto
References: <9048@megaron.arizona.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cbmvax!ditto
From: ditto@cbmvax.UUCP (Michael "Ford" Ditto)
Newsgroups: comp.sys.amiga.tech
Subject: Re: How to find out whether a file is a directory?
Summary: ( FileInfoBlock.fib_DirEntryType > 0 )
Message-ID: <5907@cbmvax.UUCP>
Date: 6 Feb 89 20:21:25 GMT
References: <9048@megaron.arizona.edu>
Reply-To: ditto@cbmvax.UUCP (Michael "Ford" Ditto)
Organization: Commodore Technology, West Chester, PA
Lines: 15