|
Libraries object |
Top |
|
libraries obj=new("libraries")
The libraries object provides access to the list of libraries that are known on a system.
Lists are returned in linefeed-delimited ($0A$) format, and each list row can be in one of two formats: just library path names, or all library details.
A name-only template contains one field: pathname$.
A detail template contains the following fields, delimited by a tab ($09$) or other character, if specified:
Methods
returns the names of all libraries, including inactive ones. If detail is true (1), then lines of detail are returned; if not, only path names are returned. If delim$ is not null, that is used as a template delimiter character; if it is null, a tab ($09$) delimiter is used.
returns the names of all libraries the specified user can delete from. If detail is true (1), then lines of detail are returned; if not, only path names are returned. If delim$ is not null, that is used as a template delimiter character; if it is null, a tab ($09$) delimeter is used.
returns the names of all active libraries. If detail is true (1), then lines of detail are returned; if not, only path names are returned. If delim$ is not null, that is used as a template delimiter character; if it is null, a tab ($09$) delimeter is used.
returns the names of all libraries the specified user can read from. If detail is true (1), then lines of detail are returned; if not, only path names are returned. If delim$ is not null, that is used as a template delimiter character; if it is null, a tab ($09$) delimeter is used.
returns a string template definition for detail or non-detail return lines, optionally with the specified delimiter. If no delimiter is specified, a tab delimiter ($09$) is assumed.
returns the names of all libraries the specified user can write to. If detail is true (1), then lines of detail are returned; if not, only path names are returned. If delim$ is not null, that is used as a template delimiter character; if it is null, a tab ($09$) delimeter is used.
The following code fragment illustrates how one could parse a library list.
obj=new("libraries") dim row$:obj'gettemplate$(1) rows$=obj'getnames$(1) x=pos($0a$=rows$) while x>0 row$=rows$(1,x-1) rows$=rows$(x+1) libname$=row.basename$ libpath$=row.dirname$ libcount=row.count x=pos($0a$=rows$) wend drop object obj
|