# Interface Tree

#### Hierarchy

- UnixTree
- Puttable
  - Tree

#### Implemented by

- BaseTree

- Defined in fs/types.ts:145

#####
Index

### Properties

readOnly

### Methods

add
addRecurse
cat
createChildTree
createOrUpdateChildFile
exists
get
getDirectChild
getLinks
getOrCreateDirectChild
ls
mkdir
mkdirRecurse
mv
put
putDetailed
removeDirectChild
rm
rmRecurse
updateChild
updateDirectChild
updateLink

## Properties

### readOnly

readOnly: boolean

Inherited from UnixTree.readOnly

- Defined in fs/types.ts:133

## Methods

### add

- add(path: Path, content: Uint8Array): Promise<Tree>

- #### Parameters

  - ##### path: Path

  - ##### content: Uint8Array

  #### Returns Promise<Tree>

  Inherited from UnixTree.add

  - Defined in fs/types.ts:138

### addRecurse

- addRecurse(path: Path, content: Uint8Array, onUpdate: Maybe<UpdateCallback>): Promise<Tree>

- #### Parameters

  - ##### path: Path

  - ##### content: Uint8Array

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

  #### Returns Promise<Tree>

  - Defined in fs/types.ts:150

### cat

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

- #### Parameters

  - ##### path: Path

  #### Returns Promise<Uint8Array>

  Inherited from UnixTree.cat

  - Defined in fs/types.ts:137

### createChildTree

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

- #### Parameters

  - ##### name: string

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

  #### Returns Promise<Tree>

  - Defined in fs/types.ts:146

### createOrUpdateChildFile

- createOrUpdateChildFile(content: Uint8Array, name: string, onUpdate: Maybe<UpdateCallback>): Promise<File>

- #### Parameters

  - ##### content: Uint8Array

  - ##### name: string

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

  #### Returns Promise<File>

  - Defined in fs/types.ts:147

### exists

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

- #### Parameters

  - ##### path: Path

  #### Returns Promise<boolean>

  Inherited from UnixTree.exists

  - Defined in fs/types.ts:142

### get

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

- #### Parameters

  - ##### path: Path

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

  Overrides UnixTree.get

  - Defined in fs/types.ts:156

### getDirectChild

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

- #### Parameters

  - ##### name: string

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

  - Defined in fs/types.ts:157

### getLinks

- getLinks(): Links

- #### Returns Links

  - Defined in fs/types.ts:161

### getOrCreateDirectChild

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

- #### Parameters

  - ##### name: string

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

  #### Returns Promise<File | Tree>

  - Defined in fs/types.ts:158

### ls

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

- #### Parameters

  - ##### path: Path

  #### Returns Promise<Links>

  Inherited from UnixTree.ls

  - Defined in fs/types.ts:135

### mkdir

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

- #### Parameters

  - ##### path: Path

  #### Returns Promise<Tree>

  Inherited from UnixTree.mkdir

  - Defined in fs/types.ts:136

### mkdirRecurse

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

- #### Parameters

  - ##### path: Path

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

  #### Returns Promise<Tree>

  - Defined in fs/types.ts:149

### mv

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

- #### Parameters

  - ##### from: Path

  - ##### to: Path

  #### Returns Promise<Tree>

  Inherited from UnixTree.mv

  - Defined in fs/types.ts:140

### put

- put(): Promise<CID<unknown, number, number, Version>>

- #### Returns Promise<CID<unknown, number, number, Version>>

  Inherited from Puttable.put

  - Defined in fs/types.ts:108

### putDetailed

- putDetailed(): Promise<PutResult>

- #### Returns Promise<PutResult>

  Inherited from Puttable.putDetailed

  - Defined in fs/types.ts:109

### removeDirectChild

- removeDirectChild(name: string): Tree

- #### Parameters

  - ##### name: string

  #### Returns Tree

  - Defined in fs/types.ts:155

### rm

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

- #### Parameters

  - ##### path: Path

  #### Returns Promise<Tree>

  Inherited from UnixTree.rm

  - Defined in fs/types.ts:139

### rmRecurse

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

- #### Parameters

  - ##### path: Path

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

  #### Returns Promise<Tree>

  - Defined in fs/types.ts:151

### updateChild

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

- #### Parameters

  - ##### child: File | Tree

  - ##### path: Path

  #### Returns Promise<Tree>

  - Defined in fs/types.ts:153

### updateDirectChild

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

- #### Parameters

  - ##### child: File | Tree

  - ##### name: string

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

  #### Returns Promise<Tree>

  - Defined in fs/types.ts:154

### updateLink

- updateLink(name: string, result: PutResult): Tree

- #### Parameters

  - ##### name: string

  - ##### result: PutResult

  #### Returns Tree

  - Defined in fs/types.ts:160

Generated using TypeDoc