Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-FileFattrib() GEMDOSSyntaxLONG Fattrib( fname, flag, attr )
char *fname;
WORD flag, attr;
Function Fattrib() reads or modifies the attribute bits of a GEMDOS file.
Opcode 67 (0x43)
Availability All GEMDOSversions.
Parameters fname is a pointer to a null-terminated string which contains
the GEMDOS filename of the file to manipulate. flag should be
set to FA_INQUIRE (0) to read the file's attributes and
FA_SET (1) to set them. If you are setting attributes,
attr contains the file's new attributes.
Binding move.w attr,-(sp)
move.w flag,-(sp)
pea fname
move.w #$43,-(sp)
trap #1
lea 10(sp),sp
Return Value If reading the attributes, Fattrib() returns a bit array of
attributes as defined below. If setting the attributes,
Fattrib() returns the file's old attributes. In any case,
a negative return code indicates that a GEMDOS error
occurred.
Name Bit Meaning
FA_READONLY 0 Read-only flag
FA_HIDDEN 1 Hidden file flag
FA_SYSTEM 2 System file flag
FA_VOLUME 3 Volume label flag
FA_DIR 4 Subdirectory
FA_ARCHIVE 5 Archive flag
- 6... Currently reserved
Caveats GEMDOSversions below 0.15 did not set the archive bit
correctly. The archive bit is now correctly set by TOS when
a file is created or written to.