Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 1.69 KB

walker-protected.md

File metadata and controls

32 lines (27 loc) · 1.69 KB

Walker protected API

Protected properties

  • _nDirs : number - available via stats public property;
  • _nEntries : number - available via stats public property and as tick() argument;
  • _nErrors : number - available via stats public property;
  • _nRetries : number - available via stats public property;
  • _nRevoked : number - available via stats public property;
  • _nWalks : number - available via stats public property;
  • _nextTick : number - the earliest time for the next tick() call; NaN will disable;
  • _options : Object - constructor options received;
  • _useSymLinks : boolean - enables symbolic links detection;
  • _visited : Map - used as a Set of visited directory paths by Walker itself, but derived classes may use its values too;
  • _tStart, _tTotal : bigint - for computing duration property value.

Protected methods

It is very likely that you'll never need to call those methods directly.

checkError_(error:Error, context:TDirContext, locus:string)
Calls getOverride() and sets up _error.context_before calling onError() handler. If onError returns a numeric value, it is used as an overriding action code and the error registers in failures instance property. Without an override, sets Shared Terminal Condition and returns DO_ABORT.

execAsync_(functionName, context, ...args) : Promise<*>
Asynchronous form of execSync_(). It also handles DO_RETRY actions and internal filesystem API calls.

execSync_(functionName, context, ...args) : *
Executes context[functionName] and calls context.trace(). Then, if there was an exception, calls checkError_().