mise API - v0.0.0
    Preparing search index...

    Function path_extractPluginInstanceID

    • Extracts the plugin instance ID of the feed node a path is in.

      A feed is a chain of nodes, feed_N/<plugin>_<ID>/<plugin>_<ID>/…, and each node keeps its output under data. The node is the last <name>_<ID> of that chain: the walk starts after feed_N and stops at the first data folder or at any segment that is not a node's name, so a folder inside a node's output (data/subject_01, data/sub_7/run_2) is never read as a node, however it is named (#1268).

      Parameters

      • dirPath: string

        The directory path to analyze.

      Returns number | null

      The plugin instance ID as a number, or null if not found.

      // From deep inside a node's output
      path_extractPluginInstanceID('/home/chris/feeds/feed_123/pl-dircopy_456/data/subject_01/')
      // Returns: 456

      // A child node, from its data directory
      path_extractPluginInstanceID('/home/chris/feeds/feed_123/pl-dircopy_456/pl-dcm2niix_789/data/')
      // Returns: 789