public function toArray($reindex = false)
    {
        $array = [];

        foreach ($this as $key => $path) {
            if ($reindex) {
                $array[] = (string) clone $path;
            } else {
                $array[$key] = (string) clone $path;
            }
        }

        return $array;
    }