basic.%chmod

C Function/BASIC Program, Releases: AP/Unix

Changes mode of given file.

Syntax

variable=%chmod(string, mode)

Description

changes the mode of the file 'string' to the value specified in 'mode'.

The valid values for 'mode' are in the include 'mode.h'. Combinations of the modes are obtained by adding several elementary mode values together.

Example

include dm,bp,unix.h mode.h
file='/usr/pick'
n=%chmod(file, O$WRONLY)

See Also

Command Name Type Description
basic.cfunc Definition can be called from a Pick/BASIC program or subroutine in AP/DOS and AP/Unix implementations using a syntax similar to that of normal C.
basic.cfunction Definition Declare a list of C functions.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.