The following mode fields restrict the data type as described:
f&!w—read-only files
!w—read-only files and directories
f&x—executable files
f&r&x—files that are both writable and executable
x|!w—files that are executable or read-only
The following data type definition creates an data type for read-only, non-executable files whose file names follow the naming convention *.doc. It assumes that a View action has been defined for the data type.
DATA_ATTRIBUTES ReadOnlyDocument
{
ICON read_only
DESCRIPTION This document is not writable. Double- \
clicking runs your editor with a \
read-only copy of the file.
ACTIONS View
}
DATA_CRITERIA ReadOnlyDocument_Criteria
{
NAME_PATTERN *.doc
MODE !d&!x&!w
DATA_ATTRIBUTES_NAME ReadOnlyDocument
}