@rogerpence/rp-utils
    Preparing search index...

    Function getTruncatedPath

    • Parameters

      • fullPath: string
      • lastDirectory: string

      Returns string

      'fullPath' value truncated after 'lastDirectory'

      truncatePathAfterDirectory(`c:\\one\\two\\three\\test.json`, 'two')
      

      returns c:\\one\\two

      An error occurs and processing stops if 'fullPath' doesn't include the 'lastDirectory' folder.