<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@fgv/ts-web-extras](./ts-web-extras.md) &gt; [FileApiTreeAccessors](./ts-web-extras.fileapitreeaccessors.md) &gt; [create](./ts-web-extras.fileapitreeaccessors.create.md)

## FileApiTreeAccessors.create() method

Create FileTree from various file sources using TreeInitializer array.

**Signature:**

```typescript
static create<TCT extends string = string>(initializers: TreeInitializer[], params?: FileTree.IFileTreeInitParams<TCT>): Promise<Result<FileTree.FileTree<TCT>>>;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

initializers


</td><td>

[TreeInitializer](./ts-web-extras.treeinitializer.md)<!-- -->\[\]


</td><td>

Array of TreeInitializer objects specifying file sources


</td></tr>
<tr><td>

params


</td><td>

FileTree.IFileTreeInitParams&lt;TCT&gt;


</td><td>

_(Optional)_ Optional `IFileTreeInitParams` for the file tree.


</td></tr>
</tbody></table>

**Returns:**

Promise&lt;Result&lt;FileTree.FileTree&lt;TCT&gt;&gt;&gt;

Promise resolving to a FileTree with all content pre-loaded

