### Hierarchy

- BaseTree
  - BareTree

## Index

### Constructors

- constructor

### Properties

- children
- links
- readOnly
- type

### Methods

- add
- addRecurse
- cat
- createChildTree
- createOrUpdateChildFile
- exists
- get
- getDirectChild
- getLinks
- getOrCreateDirectChild
- ls
- mkdir
- mkdirRecurse
- mv
- put
- putAndUpdateLink
- putDetailed
- read
- removeDirectChild
- rm
- rmRecurse
- updateChild
- updateDirectChild
- updateLink
- write
- empty
- fromCID
- fromLinks
- instanceOf

## Constructors

### constructor

- new BareTree(links: HardLinks): BareTree

- Overrides BaseTree.constructor

  - Defined in fs/bare/tree.ts:24

  #### Parameters

  - ##### links: HardLinks

  #### Returns BareTree

## Properties

### children

children: {}

- Defined in fs/bare/tree.ts:21

#### Type declaration

- ##### [name: string]: Tree | File

### links

links: HardLinks

- Defined in fs/bare/tree.ts:20

### readOnly

readOnly: boolean

Inherited from BaseTree.readOnly

- Defined in fs/base/tree.ts:14

### type

type: "BareTree"

- Defined in fs/bare/tree.ts:22

## Methods

### add

- add(path: Path, content: FileContent): Promise<BareTree>

- Inherited from BaseTree.add

  - Defined in fs/base/tree.ts:69

  #### Parameters

  - ##### path: Path

  - ##### content: FileContent

  #### Returns Promise<BareTree>

### addRecurse

- addRecurse(path: Path, content: FileContent, onUpdate: Maybe<UpdateCallback>): Promise<BareTree>

- Inherited from BaseTree.addRecurse

  - Defined in fs/base/tree.ts:74

  #### Parameters

  - ##### path: Path

  - ##### content: FileContent

  - ##### onUpdate: Maybe<UpdateCallback>

  #### Returns Promise<BareTree>

### cat

- cat(path: Path): Promise<FileContent>

- Inherited from BaseTree.cat

  - Defined in fs/base/tree.ts:35

  #### Parameters

  - ##### path: Path

  #### Returns Promise<FileContent>

### createChildTree

- createChildTree(name: string, onUpdate: Maybe<UpdateCallback>): Promise<Tree>

- Overrides BaseTree.createChildTree

  - Defined in fs/bare/tree.ts:54

  #### Parameters

  - ##### name: string

  - ##### onUpdate: Maybe<UpdateCallback>

  #### Returns Promise<Tree>

### createOrUpdateChildFile

- createOrUpdateChildFile(content: FileContent, name: string, onUpdate: Maybe<UpdateCallback>): Promise<BareFile>

- Overrides BaseTree.createOrUpdateChildFile

  - Defined in fs/bare/tree.ts:69

  #### Parameters

  - ##### content: FileContent

  - ##### name: string

  - ##### onUpdate: Maybe<UpdateCallback>

  #### Returns Promise<BareFile>

### exists

- exists(path: Path): Promise<boolean>

- Inherited from BaseTree.exists

  - Defined in fs/base/tree.ts:170

  #### Parameters

  - ##### path: Path

  #### Returns Promise<boolean>

### get

- get(path: Path): Promise<null | File | Tree>

- Overrides BaseTree.get

  - Defined in fs/bare/tree.ts:129

  #### Parameters

  - ##### path: Path

  #### Returns Promise<null | File | Tree>

### getDirectChild

- getDirectChild(name: string): Promise<null | File | Tree>

- Overrides BaseTree.getDirectChild

  - Defined in fs/bare/tree.ts:107

  #### Parameters

  - ##### name: string

  #### Returns Promise<null | File | Tree>

### getLinks

- getLinks(): BaseLinks

- Overrides BaseTree.getLinks

  - Defined in fs/bare/tree.ts:150

  #### Returns BaseLinks

### getOrCreateDirectChild

- getOrCreateDirectChild(name: string, onUpdate: Maybe<UpdateCallback>): Promise<File | Tree>

- Inherited from BaseTree.getOrCreateDirectChild

  - Defined in fs/base/tree.ts:183

  #### Parameters

  - ##### name: string

  - ##### onUpdate: Maybe<UpdateCallback>

  #### Returns Promise<File | Tree>

### ls

- ls(path: Path): Promise<Links>

- Inherited from BaseTree.ls

  - Defined in fs/base/tree.ts:25

  #### Parameters

  - ##### path: Path

  #### Returns Promise<Links>

### mkdir

- mkdir(path: Path): Promise<BareTree>

- Inherited from BaseTree.mkdir

  - Defined in fs/base/tree.ts:45

  #### Parameters

  - ##### path: Path

  #### Returns Promise<BareTree>

### mkdirRecurse

- mkdirRecurse(path: Path, onUpdate: Maybe<UpdateCallback>): Promise<BareTree>

- Inherited from BaseTree.mkdirRecurse

  - Defined in fs/base/tree.ts:49

  #### Parameters

  - ##### path: Path

  - ##### onUpdate: Maybe<UpdateCallback>

  #### Returns Promise<BareTree>

### mv

- mv(from: Path, to: Path): Promise<BareTree>

- Inherited from BaseTree.mv

  - Defined in fs/base/tree.ts:130

  #### Parameters

  - ##### from: Path

  - ##### to: Path

  #### Returns Promise<BareTree>

### put

- put(): Promise<CID>

- Inherited from BaseTree.put

  - Defined in fs/base/tree.ts:20

  #### Returns Promise<CID>

### putAndUpdateLink

- putAndUpdateLink(child: Puttable, name: string, onUpdate: Maybe<UpdateCallback>): Promise<BareTree>

- - Defined in fs/bare/tree.ts:87

  #### Parameters

  - ##### child: Puttable

  - ##### name: string

  - ##### onUpdate: Maybe<UpdateCallback>

  #### Returns Promise<BareTree>

### putDetailed

- putDetailed(): Promise<AddResult>

- Overrides BaseTree.putDetailed

  - Defined in fs/bare/tree.ts:83

  #### Returns Promise<AddResult>

### read

- read(path: Path): Promise<null | File | Tree>

- Inherited from BaseTree.read

  - Defined in fs/base/tree.ts:175

  #### Parameters

  - ##### path: Path

  #### Returns Promise<null | File | Tree>

### removeDirectChild

- removeDirectChild(name: string): BareTree

- Overrides BaseTree.removeDirectChild

  - Defined in fs/bare/tree.ts:99

  #### Parameters

  - ##### name: string

  #### Returns BareTree

### rm

- rm(path: Path): Promise<BareTree>

- Inherited from BaseTree.rm

  - Defined in fs/base/tree.ts:98

  #### Parameters

  - ##### path: Path

  #### Returns Promise<BareTree>

### rmRecurse

- rmRecurse(path: Path, onUpdate: Maybe<UpdateCallback>): Promise<BareTree>

- Inherited from BaseTree.rmRecurse

  - Defined in fs/base/tree.ts:103

  #### Parameters

  - ##### path: Path

  - ##### onUpdate: Maybe<UpdateCallback>

  #### Returns Promise<BareTree>

### updateChild

- updateChild(child: File | Tree, path: Path): Promise<BareTree>

- Inherited from BaseTree.updateChild

  - Defined in fs/base/tree.ts:194

  `put` is called on child (result of promise) in `updateDirectChild` Then for the outermost parent, `put` should be called manually.

  #### Parameters

  - ##### child: File | Tree

  - ##### path: Path

  #### Returns Promise<BareTree>

### updateDirectChild

- updateDirectChild(child: File | Tree, name: string, onUpdate: Maybe<UpdateCallback>): Promise<BareTree>

- Overrides BaseTree.updateDirectChild

  - Defined in fs/bare/tree.ts:94

  #### Parameters

  - ##### child: File | Tree

  - ##### name: string

  - ##### onUpdate: Maybe<UpdateCallback>

  #### Returns Promise<BareTree>

### updateLink

- updateLink(name: string, result: AddResult): BareTree

- Overrides BaseTree.updateLink

  - Defined in fs/bare/tree.ts:144

  #### Parameters

  - ##### name: string

  - ##### result: AddResult

  #### Returns BareTree

### write

- write(path: Path, content: FileContent): Promise<BareTree>

- Inherited from BaseTree.write

  - Defined in fs/base/tree.ts:179

  #### Parameters

  - ##### path: Path

  - ##### content: FileContent

  #### Returns Promise<BareTree>

### Static empty

- empty(): Promise<BareTree>

- - Defined in fs/bare/tree.ts:31

  #### Returns Promise<BareTree>

### Static fromCID

- fromCID(cid: CID): Promise<BareTree>

- - Defined in fs/bare/tree.ts:35

  #### Parameters

  - ##### cid: CID

  #### Returns Promise<BareTree>

### Static fromLinks

- fromLinks(links: HardLinks): BareTree

- - Defined in fs/bare/tree.ts:42

  #### Parameters

  - ##### links: HardLinks

  #### Returns BareTree

### Static instanceOf

- instanceOf(obj: unknown): obj is BareTree

- - Defined in fs/bare/tree.ts:46

  #### Parameters

  - ##### obj: unknown

  #### Returns obj is BareTree

Generated using TypeDoc