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 or nbio
glob_resource( string:pattern )
glob_resource( string:pattern, int:domain )
glob_resource( string:pattern, int:domain, bool:asynch )
glob_resource( string:pattern, string:namespace )
glob_resource( string:pattern, string:namespace, bool:asynch )
glob_resource( string:pattern, int:domain )

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 . If the *asynch" argument is provided, the function will return a nbio table as if opened with open_nonblock , or nil if there are too many open files or not enough memory. The results readable from open_nonblock will contain the terminating   in order to capture file names with special characters. They will also contain the namespace relative path prefix. open_nonblock :lf_strip(true, " ") can be used to get per-read separation and

1
the default domain is the compile-time defined ( DEFAULT_USERMASK ) which is comprised of (application- specific, application shared, application temporary)
2
Due to legacy and backwards compatibility, the synchronous results contain only filename and, possibly, extension.
3

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)

July 2025 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.