Search Results for

Show / Hide Table of Contents

# Class PathBuilder

Reconstructs full hierarchical paths from a flat record array. Each record holds its parent's index in ParentIndex, so a path is built by walking parent links back to a root entry (where `ParentIndex` equals the entry's own index, or is out of range).

##### Inheritance

object
PathBuilder

##### Inherited Members

object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()

###### Namespace: FexViewer.Models

###### Assembly: FexViewer.dll

##### Syntax

    public static class PathBuilder

##### Remarks

Doing this in C# is significantly faster than calling `GetFilePath` per record for large filesystems — one pass over the array versus one round-trip per file.

### Methods

#### BuildFullPaths(IReadOnlyList<FileRecord>)

Builds the full path for every record in `records`.

##### Declaration

    public static string[] BuildFullPaths(IReadOnlyList<FileRecord> records)

##### Parameters

Type | Name | Description
--- | --- | ---
IReadOnlyList<FileRecord> | records | Flat record list as produced by GetFileList(int).

##### Returns

Type | Description
--- | ---
string[] | Array of paths the same length and order as `records`. Each path begins with `/` and uses `/` as the separator regardless of host OS.

##### Exceptions

Type | Condition
--- | ---
ArgumentNullException | `records` is null.