flsfls
Directory listing of resources on the native filesystem
Home > Books > NetKernel API and Services Reference > Accessor Listing > Utility and System Accessors > fls

Rate this page:
Really useful
Satisfactory
Not helpful
Confusing
Incorrect
Unsure
Extra comments:


Module

urn:org:ten60:netkernel:ext:sys

The fls accessor is exported by the urn:org:ten60:netkernel:ext:sys module. Import this module to gain access to the accessor.

Syntax

URI
active:fls

ArgumentRulesDescription
operatorMandatory XML fragment specifying listing properties

Example Usage

DPML

<instr>
  <type>fls</type>
  <operator>
    <fls>
      <root>file:///home/foo/bar/</root>
      <filter>.*xml</filter>
      <recursive />
      <uri />
    </fls>
  </operator>
  <target>var:als</target>
</instr>

NetKernel Foundation API

req=context.createSubRequest("active:fls");
req.addArgument("operator", [resource representation, aspect, or URI] );
result=context.issueSubRequest(req);

Purpose

The fls accessor generates an XML fragment containing a directory listing of the host operating system's filesystem. The listing is generated as the accessor walks the filesystem starting at a specified root location. While processing the request, resources that match a regular expression filter are added to the listing.

The resulting document is hierarchical tree representation of the real filesystem tree. The structure of the returned document is as follows

<fls> ...
  <dir>home
    <res>mydoc.doc
      <uri>file:///home/mydoc.doc</uri>
    </res>
  </dir> ...
</fls>

Operator Syntax

Parameters that guide fls are passed in an XML fragment identified as the operator argument. The operator XML fragment has the following form and elements:

<fls>
  <filter>.*</filter>
  <recursive />
  <uri />
  <age />
  <size />
  <lastmodified />
</fls>

<root> The base directory URI. eg file:///C:/some/path/
<filter> Filter. Regular Expression
<recursive/>Recurse the tree
<uri/>Include the full URI of the resource
<age/>Include age in ms
<size/>Include size in bytes
<lastmodified/>Include last modified in ms


(C) 2003, 1060 Research Limited
© 2003-2007, 1060 Research Limited. 1060 registered trademark, NetKernel trademark of 1060 Research Limited.