mime::getproperty (public)
mime::getproperty token [ property ]
Defined in packages/acs-tcl/tcl/tcllib-doc-procs.tcl
Read properties of a Tcllib MIME token, such as content, encoding, params, parts and size.
- Parameters:
- token (required)
- MIME token to inspect.
- property (optional)
- Property name, -names for property names, or empty for all properties.
- Returns:
- The property value, property names, or property name/value pairs.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: # FRINK: nocheck variable $token upvar 0 $token state switch -- $property { {} { array set properties [list content $state(content) encoding $state(encoding) params $state(params) size [getsize $token]] if {[info exists state(parts)]} { set properties(parts) $state(parts) } return [array get properties] } -names { set names [list content encoding params] if {[info exists state(parts)]} { lappend names parts } return $names } content - encoding - params { return $state($property) } parts { if {![info exists state(parts)]} { error "MIME part is a leaf" } return $state(parts) } size { return [getsize $token] } default { error "unknown property $property" } }XQL Not present: Generic, PostgreSQL, Oracle