GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
glob_resource(3) Arcan Lua API glob_resource(3)

glob_resource - Search the different datastores for resources matching a pattern.

strtbl
glob_resource( string:pattern )
glob_resource( string:pattern, int:domain )
glob_resource( string:pattern, string:namespace )

There 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 .

1
the default domain is the compile-time defined ( DEFAULT_USERMASK ) which is comprised of (application- specific, application shared, application temporary)
2
The results contain only filename and, possibly, extension.
3
The scan is shallow, it will not recurse into subdirectories. Therefore, more complex patterns, e.g. /*/a* will not work.
4

SYS_APPL_RESOURCE is special and relates to the list of application targets that can be used as argument to system_collapse.

function glob_resource0()
      local tbl = glob_resource("*");
      for i,v in ipairs(tbl) do
            print(v);
      end
end

function glob_resource1()
      local tbl = glob_resource("*", SYS_APPL_RESOURCE);
      for i,v in ipairs(tbl) do
            print(v);
      end
end

function glob_resource0()
      local tbl = glob_resource(0);
      if (type(tbl) ~= "table") then
            abort();
      end
end

resource(3) system_collapse(3)

June 2022 resource

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.