hed-typescript API
    Preparing search index...

    Function organizePaths

    • Organize a list of relative file paths based on BIDS naming conventions.

      Parameters

      • relativeFilePaths: string[]

        A list of relative file paths to organize.

      • suffixes: readonly string[]

        A list of filename suffixes to categorize by (e.g., 'events').

      • specialDirs: readonly string[]

        A list of special directory names (e.g., 'phenotype').

      Returns OrganizedBidsCandidates

      The relative file paths organized according to BIDS naming conventions.

      This function filters and categorizes file paths into a structured object. It identifies files based on whether they are in special directories (like 'phenotype'), are top-level files, or are located within subject-specific directories ('sub-xxx').

      Files are categorized by matching their filename against a list of suffixes (e.g., 'events', 'participants') or by their presence in a special directory. Only files with '.tsv' or '.json' extensions are considered.