$buffer-fmod - Buffer file modes (or attributes)
$global-fmod - Global file modes (or attributes)
$buffer-fmod is bit based variable setting the buffers file system modes or attributes. If the buffer was loaded from an existing file then the value of $buffer-fmod is taken directly from the file. But if the buffer was created then the buffer inherits the default file modes, $global-fmod, which is determined from the users umask on UNIX or a default on others.
The definition of the file mode bits are platform specific and are considered independently, as follows:
The file modes of Unix are the standard read, write and execute permissions for user, group and global. See chmod(1) for a full description of their use and effect.
The variable is displayed in octal.
On Microsoft platforms each file attribute (see attrib(1)) is assigned a bit, on windows 95 and NT the new file attributes such as compressed are also represented. The bits are assigned as follows
Bit Attrib Flag Attribute 0x001 R Read Only 0x002 H Hidden 0x004 S System 0x010 Directory 0x020 A Archive 0x080 Normal 0x100 Temporary 0x800 Compressed
The following example changes the $buffer-fmod so that the file will be executable (UNIX only), useful when writing a shell script.
set-variable $buffer-fmod 0775
Copyright (c) 1998-2006 JASSPA
Last Modified: 2002/10/16
Generated On: 2006/10/07