TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Daryl Willis
from: Paul Edwards
date: 1996-03-30 02:02:14
subject: attributes

DW> Ok using _dos_findfirst() I can get all the info on a file that I
DW>  need, however, the attrib returns usually 32 for archive  or 
DW> 19 for a hidden read only, I,m sure I can write something to easily 
DW>  see what bits are set in 19 but I feel it will not be the best way to
DW> do this, If someone could provide a small example of how
DW> to do this or even demonstrate the best way I would again 
DW> be appreciative

Bit testing is common in C to solve this sort of problem.

e.g. 
#define ATTRIB_HIDDEN 0x0200
if (attrib & ATTRIB_HIDDEN) { printf("hidden file!\n"); }

BFN.  Paul.
@EOT:

---
* Origin: X (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.