class %iKnow.Source.File.Lister extends %iKnow.Source.Lister

Lister implementation for scanning a filesystem.

Lister Parameters to be supplied to AddListToBatch() and ProcessList() calls:

  1. path As %String - the directory where to look for files
  2. extensions As %List - the extensions (without leading dot) to load
  3. recursive As %Boolean - whether or not to recurse into subdirectories
  4. filter As %String - a code fragment that can be called through $xecute to evaluate a filename and directory. For example:
    "(fn,dir) quit '$find(fn,""draft"")"

External ID structure: [GroupName][LocalRef]

Lister alias: "FILE"

Default Processor: %iKnow.Source.File.Processor

Property Inventory (Including Private)

Method Inventory (Including Private)


property PathSeparator as %String [ Private ];
Property methods: PathSeparatorDisplayToLogical(), PathSeparatorGet(), PathSeparatorIsValid(), PathSeparatorLogicalToDisplay(), PathSeparatorLogicalToOdbc(), PathSeparatorNormalize(), PathSeparatorSet()


private method %OnNew(domId As %Integer) as %Status [ Language = objectscript ]
Inherited description: This callback method is invoked by the %New() method to provide notification that a new instance of an object is being created.

If this method returns an error then the object will not be created.

It is passed the arguments provided in the %New call. When customizing this method, override the arguments with whatever variables and types you expect to receive from %New(). For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:

Method %OnNew(dob as %Date = "", name as %Name = "") as %Status If instead of returning a %Status code this returns an oref and this oref is a subclass of the current class then this oref will be the one returned to the caller of %New method.

private classmethod BuildFullRef(domainId As %Integer, groupName As %String, localRef As %String) as %String [ Language = objectscript ]

Appends the file name (local reference) directly to the directory (group name) to form the Full Reference.

See also BuildFullRef() in %iKnow.Source.Lister.

method ExpandList(listparams As %List) as %Status [ Language = objectscript ]

Scans through the directory as dictated by the Lister Parameters. No metadata is gathered along the way.

See also ExpandList() in %iKnow.Source.Lister.

classmethod FormatParams(listerParams As %List) as %String [ Language = objectscript ]
Inherited description:

Utility method to format the parameter string passed in AddList for display by the %iKnow.Source.Loader.GetCurrentLists() method. Defaults to $lts() but should be overridden to nicen up complex datatypes in the parameter list.

classmethod GetAlias() as %String [ Language = objectscript ]

Lister alias: "FILE"

private classmethod SplitFullRef(domainId As %Integer, fullRef As %String, Output groupName As %String, Output localRef As %String) as %Status [ Language = objectscript ]

Splits the Full Reference into a Group Name and Local Reference based on their path.

See also SplitFullRef() in %iKnow.Source.Lister.

method TestParams(listerParams...) as %Status [ Language = objectscript ]

Tests performed by this Lister:

  1. path: checks whether this is a valid string (no check on whether this is a valid path!)
  2. extensions: no checks
  3. recursive: no checks
  4. filter: if nonempty, checks whether this is a valid expression for $xecute() with two parameters

Inherited Members

Inherited Properties (Including Private)

Inherited Methods (Including Private)