[Overview][Constants][Types][Procedures and functions][Index] |
Change file permission bits
Source position: line 0
function FpChmod( |
path: PChar; |
Mode: TMode |
):cint; |
path: AnsiString; |
Mode: TMode |
):cint; |
fpChmod sets the Mode bits of the file in Path to Mode. Mode can be specified by 'or'-ing the following values:
If the function is successful, zero is returned. A nonzero return value indicates an error.
The following error codes are returned:
|
Change owner of file |
|
|
Check file access |
Program Example23; { Program to demonstrate the Chmod function. } Uses BaseUnix,Unix; Var F : Text; begin { Create a file } Assign (f,'testex21'); Rewrite (F); Writeln (f,'#!/bin/sh'); Writeln (f,'echo Some text for this file'); Close (F); fpChmod ('testex21',&777); { File is now executable } fpexecl ('./testex21',[]); end.
lazarus-ccr.sourceforge.net |