Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FileToTreeConverter

Converting a File tree to a node tree

Hierarchy

  • FileToTreeConverter

Index

Constructors

constructor

Properties

Private _log

_log: Logger

Private _options

Private _resultingTree

_resultingTree: SockoNodeInterface

Static Private CONVERTERS

CONVERTERS: Array<NodeConverterInterface> = [new SocketNodeConverter(),new BucketNodeConverter(),new CartridgeNodeConverter()]

Currently used converters

type

{NodeConverterInterface[]}

Methods

Private _convertTree

  • _convertTree(fileTree: FileNode, currentTreeNode: SockoNodeInterface): Bluebird<SockoNodeInterface>
  • Recursively convert the FileNode tree relying on NodeConverterInterfaces to convert specific feature nodes

    Parameters

    • fileTree: FileNode

      the current FileNode to convert

    • currentTreeNode: SockoNodeInterface

      the corresponding place in the resulting tree

    Returns Bluebird<SockoNodeInterface>

    the converted node

convert

  • convert(fileTree: FileNode): Bluebird<RootNodeInterface>
  • Convert the given FileNode tree into a socko-api tree.

    Parameters

    • fileTree: FileNode

      the FileNode to convert

    Returns Bluebird<RootNodeInterface>

    the root node of the resulting socko-api tree

Generated using TypeDoc