WPToolsFolderContent: Difference between revisions
Appearance
Created page with "WPToolsFolderContent Query abstract (non-disk) objects in a specific folder. Category:The OS/2 API Project" |
No edit summary |
||
Line 1: | Line 1: | ||
==Purpose== | |||
Query abstract (non-disk) objects in a specific folder | |||
==Usage== | |||
rc=WPToolsFolderContent(folder, stem [,'F']) | |||
Where : | |||
folder = A fully qualified path name to a directory, or | |||
an OBJECTID string for a folder (e.g. <WP_DESKTOP> | |||
stem = The name of a REXX stem variable that, on successful | |||
return, will contain all abstract objects present | |||
in a specific folder. Each returned entry will either | |||
be an OBJECTID (when an OBJECTID has been set for | |||
the returned object) or a string starting with a '#' and | |||
followed by the hexadecimal object handle. | |||
'F' = If specified, WPToolsFolderContent will return all | |||
filesystem objects as well. | |||
Returns: 1 on success and 0 when a error occurred. | |||
==Example== | |||
<pre> | |||
/* REXX must start with a comment line */ | |||
call RxFuncAdd 'WPToolsLoadFuncs', 'WPTOOLS', 'WPToolsLoadFuncs' | |||
call WPToolsLoadFuncs | |||
iRetco = WPToolsFolderContent("<WP_DESKTOP>", "list.") | |||
if iRetco = 0 Then Do | |||
exit | |||
End | |||
say 'Abstract objects on <WP_DESKTOP>:' | |||
do iObject = 1 to list.0 | |||
Iretco=WPToolsQueryObject(list.Iobject, "szclass", "sztitle", "szsetupstring", "szlocation") | |||
if Iretco Then do | |||
say '"'szClass'", "'szTitle'", "'szSetupString'", "'szLocation'"' | |||
end | |||
end | |||
</pre> | |||
[[Category:The OS/2 API Project]] | [[Category:The OS/2 API Project]] |
Revision as of 04:16, 24 February 2015
Purpose
Query abstract (non-disk) objects in a specific folder
Usage
rc=WPToolsFolderContent(folder, stem [,'F'])
Where :
folder = A fully qualified path name to a directory, or an OBJECTID string for a folder (e.g. <WP_DESKTOP>
stem = The name of a REXX stem variable that, on successful return, will contain all abstract objects present in a specific folder. Each returned entry will either be an OBJECTID (when an OBJECTID has been set for the returned object) or a string starting with a '#' and followed by the hexadecimal object handle.
'F' = If specified, WPToolsFolderContent will return all filesystem objects as well.
Returns: 1 on success and 0 when a error occurred.
Example
/* REXX must start with a comment line */ call RxFuncAdd 'WPToolsLoadFuncs', 'WPTOOLS', 'WPToolsLoadFuncs' call WPToolsLoadFuncs iRetco = WPToolsFolderContent("<WP_DESKTOP>", "list.") if iRetco = 0 Then Do exit End say 'Abstract objects on <WP_DESKTOP>:' do iObject = 1 to list.0 Iretco=WPToolsQueryObject(list.Iobject, "szclass", "sztitle", "szsetupstring", "szlocation") if Iretco Then do say '"'szClass'", "'szTitle'", "'szSetupString'", "'szLocation'"' end end