Common Desktop Environment: Desktop KornShell User's Guide

Built-in libDt Data-Typing Commands

DtLoadDataTypes

Loads the data-typing databases and should be invoked before any of the other data-typing commands.

DtDtsFileToDataType variable filePath

Returns the name of the data type associated with the file indicated by the filePath argument in the variable argument. The variable argument is set to an empty string if the file cannot be typed.

DtDtsFileToAttributeValue variable filePath attrName

Returns the string representing the value of the specified attribute for the data type associated with the indicated file. If the attribute is not defined, or if the file could not be typed, then the variable argument is set to an empty string.

DtDtsFileToAttributeList variable filePath

Returns the space-separated list of attribute names defined for the data type associated with the indicated file. A shell script can then query the individual values for the attributes, using the DtDtsFileToAttributeValue command. The variable argument is set to an empty string if the file cannot be typed. This command differs from its corresponding C programming counterpart, in that it only returns the names of the defined attributes and not their values.

DtDtsDataTypeToAttributeValue variable dataType attrName optName

Returns the string representing the value of the specified attribute for the indicated data type. If the attribute is not defined, or if the indicated data type does not exist, then the variable argument is set to an empty string.

DtDtsDataTypeToAttributeList variable dataType optName

Returns the space-separated list of attribute names defined for the indicated data type. A shell script can then query the individual values for the attributes, using the DtDtsDataTypeToAttributeValue command. The variable argument is set to an empty string if the data type is not defined. This command differs from its corresponding C programming counterpart, in that it only returns the names of the defined attributes and not their values.

DtDtsFindAttribute variable name value

Returns a space-separated list of datatype names whose attribute indicated by the name argument has the value indicated by the value argument. If an error occurs, the variable argument is set to an empty string.

DtDtsDataTypeNames variable

Returns a space-separated list representing all the data types currently defined in the data-types database. If an error occurs, then the variable argument is set to an empty string.

DtDtsSetDataType variable filePath dataType override

Sets a data type for the specified directory. The variable argument is set to the resultant saved data type for the directory.

DtDtsDataTypeIsAction dataType

Determines whether a particular data type represents an action entry. Returns a value which can be used in a conditional statement.