Programmer Guide/Shell Items/File/FILE Item Attributes: Difference between revisions
From STX Wiki
< Programmer Guide | Shell Items | File
Jump to navigationJump to search
Line 62: | Line 62: | ||
====Binary file item attributes==== | ====Binary file item attributes==== | ||
{| | {|class="einrahmen" | ||
|- | |- | ||
!Attribute Id !!Value(s) and Description | |||
|- | |- | ||
|!BININFO | |!BININFO | ||
Line 124: | Line 123: | ||
{|class="einrahmen" | {|class="einrahmen" | ||
!Attribute Id !! Value(s) and Description | !Attribute Id !! Argument !! Value(s) and Description | ||
|- | |- | ||
|!XALL | |!XALL | ||
|<var>tag empy cdata childs size nattr attr0 ... attrN</var> | |||
|a list of all element parts: | |||
{|class="keinrahmen" | {|class="keinrahmen" | ||
|- | |- | ||
Line 168: | Line 169: | ||
|returns 1 if element contains a CData section and 0 otherwise | |returns 1 if element contains a CData section and 0 otherwise | ||
|- | |- | ||
|!XCHILDS | | !XCHILDS or !XCHILDREN | ||
or | |||
!XCHILDREN | |||
|<nowiki>-</nowiki> | |<nowiki>-</nowiki> | ||
|returns number of child elements of the selected element | |returns number of child elements of the selected element | ||
Line 185: | Line 184: | ||
====XML file item document/element type definition attributes==== | ====XML file item document/element type definition attributes==== | ||
{| | {|class="einrahmen" | ||
!Attribute<nowiki>-</nowiki>Id | |||
!Sub<nowiki>-</nowiki>Id 1 | |||
!Sub<nowiki>-</nowiki>Id 2 | |||
!Value(s) and Description | |||
|- | |- | ||
|!XDTNAME | |!XDTNAME | ||
Line 217: | Line 208: | ||
|index or tag | |index or tag | ||
|<nowiki>-</nowiki> | |<nowiki>-</nowiki> | ||
|definition of element type with specified index or tag; | |definition of element type with specified index or tag; the result is <code>tag parent base nobase datawith</code>: | ||
{| | |||
! tag !! element tag | |||
|- | |- | ||
|parent | |parent | ||
Line 234: | Line 224: | ||
|data type name or * | |data type name or * | ||
|} | |} | ||
|- | |- | ||
|!XDTCHILDREN | |!XDTCHILDREN | ||
Line 245: | Line 233: | ||
|tag | |tag | ||
|cindex or ctag | |cindex or ctag | ||
|definition of child cindex or ctag of the element tag. The result is:ctag min maxwith:{| | |definition of child cindex or ctag of the element tag. The result is:ctag min maxwith: | ||
{| | |||
! ctag !! tag of child element | |||
|- | |- | ||
|min | |min | ||
Line 256: | Line 243: | ||
|number of maximum occurrences or <nowiki>-</nowiki>1 if not defined | |number of maximum occurrences or <nowiki>-</nowiki>1 if not defined | ||
|} | |} | ||
|- | |- | ||
|!XDTATTRIBUTES | |!XDTATTRIBUTES | ||
Line 267: | Line 252: | ||
|tag | |tag | ||
|aindex or aname | |aindex or aname | ||
|definition of attribute aindex or aname of element tag. The result is:aname req vis val type paramswith:{| | |definition of attribute aindex or aname of element tag. The result is:aname req vis val type paramswith: | ||
{| | |||
! aname !! name of attribute | |||
|- | |- | ||
|req | |req | ||
Line 299: | Line 283: | ||
|value1 value2 ... | |value1 value2 ... | ||
|} | |} | ||
|} | |} | ||
|} | |} | ||
Revision as of 13:28, 9 May 2012
Contents
FILE Item Attributes
The following file item attributes can be queried in the format $#fileItem[AttributeId]
.
General file item attributes
Attribute Id | Value(s) and Description | ||||
---|---|---|---|---|---|
!PATH | full path of file attached to the file item | ||||
!DRIVE | drive letter (without trailing : ) of file attached to the file item
| ||||
!DIRECTORY | directory (without trailing \ ) of file attached to the file item
| ||||
!NAME | name of file attached to the file item | ||||
!EXTENSION | filetype-extension (without leading . ) of file attached to the file item
| ||||
!CREATED | creation date and time (yyyy.mm.dd hh.mm.ss) of file attached to the file item | ||||
!MODIFIED | time of last modification (yyyy.mm.dd hh.mm.ss) of file attached to the file item | ||||
!ATTRIBUTES | HIDDEN|NORMALtype attributes of file attached to the file item | ||||
!ACCESS | APPENDaccess attributes of file attached to the file item | ||||
!SIZE | filesize,size of file attached to the file item in bytes | ||||
!TYPE | TEXT|SECTION|XMLtype of file item (set in NEW command) | ||||
!SHELL | ownershellidid of shell creating the file item (8 hex digits) | ||||
!USERS | numusersnumber of linked items sharing the file item | ||||
!LASTACCESS | lastaccesseddatetime(yyyy.mm.dd hh.mm.ss) date and time of the last access to the file attached to the file item | ||||
!CHANGED |
|
Binary file item attributes
Attribute Id | Value(s) and Description |
---|---|
!BININFO | number of sectionsAfter a LIST commandindex of last loaded/saved sectionAfter a LOAD command-1If the file is not a binary file, or the last command failed. |
GDX file item attributes
The GDX file item supports the following attributes in addition to the general file item attributes.
- !DATA
- The
!DATA
attribute returns data from the GDX file.
$#gdx[!DATA] // returns all the data
$#gdx[!DATA,index,count] // returns one or more columns
index
determines the first column, andcount
the number of columns to return.
- !DATATYPE
- The !DATATYPE attribute returns the data type of this GDX file (See Creating a GDX file for details).
- !NCOL
- The
!NCOL
attribute returns the number of columns.
- !NROW
- The
!NROW
attribute returns the number of rows.
- !NWRITTEN
- The
!NWRITTEN
attribute returns the number of columns which have been written (rather than defined).
XML file item attributes
General attributes of XML file items
Attribute Id | Value(s) and Description |
---|---|
!XROOT | root_element_nametag name of the root element |
!XPARENT | parent_element_nametag name of the parent element |
!XPARENTPATH | root_element_name\..\parent_element_name full path of the parent element |
!XELEMENTS | elementcountnumber of elements on selected element level |
!XNODETYPE | COMMENT|PROC|DOCTYPE type of the selected node |
Attributes of the selected element of a XML file item
Attribute Id | Argument | Value(s) and Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
!XALL | tag empy cdata childs size nattr attr0 ... attrN | a list of all element parts:
| |||||||||||||||||||||
!XTAG | - | element_tag | |||||||||||||||||||||
!XATTRIBUTES | - | number_of_attributes | |||||||||||||||||||||
!XATTRIBUTE | index | attribute_name name of attribute number index | |||||||||||||||||||||
!XATTRIBUTE | name | attribute_value value of attribute named name | |||||||||||||||||||||
!XEMPTY | - | returns 1 if element is empty (no data) and 0 otherwise | |||||||||||||||||||||
!XCDATA | - | returns 1 if element contains a CData section and 0 otherwise | |||||||||||||||||||||
!XCHILDS or !XCHILDREN | - | returns number of child elements of the selected element | |||||||||||||||||||||
!XSIZE | - | size of data section in characters | |||||||||||||||||||||
!XDATA | - | content of data section |
XML file item document/element type definition attributes
Attribute-Id | Sub-Id 1 | Sub-Id 2 | Value(s) and Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
!XDTNAME | - | - | name of document type definition | ||||||||||||||||||||
!XDTROOT | - | - | tag of root element | ||||||||||||||||||||
!XDTELEMENTS | - | - | number of defined element types | ||||||||||||||||||||
!XDTELEMENT | index or tag | - | definition of element type with specified index or tag; the result is tag parent base nobase datawith :
| ||||||||||||||||||||
!XDTCHILDREN | tag | - | number of children defined for element tag | ||||||||||||||||||||
!XDTCHILD | tag | cindex or ctag | definition of child cindex or ctag of the element tag. The result is:ctag min maxwith:
| ||||||||||||||||||||
!XDTATTRIBUTES | tag | - | number of attributes defined for element tag | ||||||||||||||||||||
!XTDATTRIBUTE | tag | aindex or aname | definition of attribute aindex or aname of element tag. The result is:aname req vis val type paramswith:
|
|}
!XDTISA
Sub-Id1:
tag
Value(s) and Description:
returns 1 if the selected element of the file item is of type tag or is derived from tag and 0 otherwise