# $buffer-fmod(5)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

$buffer-fmod - Buffer file modes (or attributes)
$global-fmod - Global file modes (or attributes)

## SYNOPSIS

$buffer-fmod FileMode
$global-fmod FileMode

## DESCRIPTION

$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:

## UNIX

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.

## Microsoft Windows and DOS

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

## EXAMPLE

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

## SEE ALSO

cr(2m), lf(2m), ctrlz(2m), auto(2m).

(c) Copyright JASSPA 2009
Last Modified: 2009/10/03
Generated On: 2009/10/12

</HMTL>