Article View: demon.ip.developers
Article #1042Re: findfirst() / _dos_findfirst()
From: Paul Carpenter
Date: Thu, 09 May 1996 00:00
Date: Thu, 09 May 1996 00:00
42 lines
2474 bytes
2474 bytes
philip@siberia.demon.co.uk "Philip McNab" writes:
-On Wednesday, in article <831588719snz@pdlmail.demon.co.uk>
- pete@pdlmail.demon.co.uk "Peter Disdale" wrote:
-PD> In any case, "both" functions would eventually end in a DOS
-PD> call to services 0x4e/0x4f. Though the peculiar logic of
-PD> this call wrt file attributes has always baffled me :-)
-
-Me too! If anyone has the wisdom and inclination to explain it, I'm
-sure we could regard it as on-topic, since there are so many parts of
-the DIS suite that rely on it. And I'd love to be released from my
-ignorance :)
Your normal calls are to find 'normal' files (attribute = 0), about the only
useful attribute settings that I could see you wanting to use would be -
subdirectory and/or archive. All the files are normally not read-only, hidden,
system or even a volume name.
If you want you could check to see if any file has been updated by finding all
files with the archive bit set, you might want to check a sub-directory exists.
I see little but general use for these attribute bits, unless you are wanting
to create a load of hidden files ;)
From information I have the attibute byte in the dircetory structure which you
are matching against and get returned are:-
Bit Meaning
0 1 = Read only
1 1 = Hidden file
2 1 = System file
3 1 = Volume Name (i.e. file entry in \ is the volume name)
4 1 = Subdirectory
5 1 = Archive bit
6 & 7 Reserved
May be newer info about than my older sources...
--
Paul Carpenter | paul@pcserv.demon.co.uk
Consulting for DSP, Image processing, System tuning & more..
email: listuser@pcserv.demon.co.uk - how to use Consultant/Trainers listings
email: consult@pcserv.demon.co.uk - to join the Consultant/Trainers listings
Technical Details
Message-ID:
<831636106snz@pcserv.demon.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<831575697snz@wash.demon.co.uk> <831588719snz@pdlmail.demon.co.uk> <831609093snz@siberia.demon.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10bb05,eea2e7ecc42db8da X-Google-Attributes: gid10bb05,public From: Paul Carpenter <paul@pcserv.demon.co.uk> Subject: Re: findfirst() / _dos_findfirst() Date: 1996/05/09 Message-ID: <831636106snz@pcserv.demon.co.uk> X-Deja-AN: 154172370 x-nntp-posting-host: pcserv.demon.co.uk references: <831575697snz@wash.demon.co.uk> <831588719snz@pdlmail.demon.co.uk> <831609093snz@siberia.demon.co.uk> x-mail2news-path: pcserv.demon.co.uk organization: PC Services reply-to: paul@pcserv.demon.co.uk newsgroups: demon.ip.developers