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()Fxattr()File System Extensions#FIXME: "access permissions" is a label only and can't be directly referenced
#@xref "access permissions"
Fchmod() GEMDOSSyntaxLONG Fchmod( name, mode )
char *name;
WORD mode;
Function Fchmod() alters file access permissions of the named file.
Opcode 306 (0x132)
Availability Available when a 'MiNT' cookie with a version of at least
0.90 exists.
Parameters name specifies a valid GEMDOS file specification of the
file whose access permissions you wish to modify. mode is
a bit mask composed by OR'ing together values defined as
follows (in octal):
Name Mask Meaning
S_IRUSR 0400 Read permission for the owner of the file.
S_IWUSR 0200 Write permission for the owner of the file.
S_IXUSR 0100 Execute permission for the owner of the
file.
S_IRGRP 0040 Read permission for members of the same
group the file belongs to.
S_IWGRP 0020 Write permission for members of the same
group the file belongs to.
S_IXGRP 0010 Execute permission for members of the same
group the file belongs to.
S_IROTH 0004 Read permission for all others.
S_IWOTH 0002 Write permission for all others.
S_IXOTH 0001 Execute permission for all others.
Binding move.w mode,-(sp)
pea name
move.w #$132,-(sp)
trap #1
addq.l #8,sp
Return Value Fchmod() returns E_OK (0) if successful or a negative GEMDOS error code otherwise.
Caveats Not all file systems support all bits. Unrecognized bits
will be ignored.
Comments Only the owner of a file may change a file's permission
status.'Execute' status refers to the permission to search
the named directory for a file name or component.
See Also Fattrib(), Fxattr(), access permissions