|
NAMEglob_resource - Search the different datastores for resources matching a pattern.SYNOPSISstrtblglob_resource( string:pattern ) glob_resource( string:pattern, int:domain ) glob_resource( string:pattern, string:namespace ) DESCRIPTIONThere are a number of different statically defined namespaces (distinct group where a certain resource key corresponds to a file or similar data-source). This function allows you to query parts of these namespaces (indicated by a search path, pattern ). By specifying a domain you can limit the search to a specific set of namespaces. This domain can be a predefined bitmap of numeric constants, or a user-defined dynamic namespace tag. Valid constants for domain (can be OR ed) are APPL_RESOURCE , APPL_TEMP_RESOURCE , SHARED_RESOURCE , SYS_APPL_RESOURCE , SYS_FONT_RESOURCE , APPL_STATE_RESOURCE , The dynamic namespace tag has to match a valid name from list_namespaces .NOTES
EXAMPLEfunction glob_resource0() local tbl = glob_resource("*"); for i,v in ipairs(tbl) do print(v); end end EXAMPLEfunction glob_resource1() local tbl = glob_resource("*", SYS_APPL_RESOURCE); for i,v in ipairs(tbl) do print(v); end end MISUSEfunction glob_resource0() local tbl = glob_resource(0); if (type(tbl) ~= "table") then abort(); end end SEE ALSO:resource(3) system_collapse(3)
Visit the GSP FreeBSD Man Page Interface. |