### Hierarchy

- BaseTree
  - <internal>.default
  - BareTree

### Implements

- Tree
- UnixTree

## Index

### Constructors

- constructor

### Properties

- readOnly

### Methods

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

## Constructors

### constructor

- new BaseTree(): BaseTree

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

  #### Returns BaseTree

## Properties

### readOnly

readOnly: boolean

Implementation of UnixTree.readOnly

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

## Methods

### add

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

- Implementation of UnixTree.add

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

  #### Parameters

  - ##### path: Path

  - ##### content: FileContent

  #### Returns Promise<BaseTree>

### addRecurse

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

- Implementation of Tree.addRecurse

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

  #### Parameters

  - ##### path: Path

  - ##### content: FileContent

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

  #### Returns Promise<BaseTree>

### cat

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

- Implementation of UnixTree.cat

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

  #### Parameters

  - ##### path: Path

  #### Returns Promise<FileContent>

### Abstract createChildTree

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

- Implementation of Tree.createChildTree

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

  #### Parameters

  - ##### name: string

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

  #### Returns Promise<Tree>

### Abstract createOrUpdateChildFile

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

- Implementation of Tree.createOrUpdateChildFile

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

  #### Parameters

  - ##### content: FileContent

  - ##### name: string

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

  #### Returns Promise<File>

### exists

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

- Implementation of UnixTree.exists

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

  #### Parameters

  - ##### path: Path

  #### Returns Promise<boolean>

### Abstract get

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

- Implementation of UnixTree.get

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

  #### Parameters

  - ##### path: Path

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

### Abstract getDirectChild

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

- Implementation of Tree.getDirectChild

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

  #### Parameters

  - ##### name: string

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

### Abstract getLinks

- getLinks(): Links

- Implementation of Tree.getLinks

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

  #### Returns Links

### getOrCreateDirectChild

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

- Implementation of Tree.getOrCreateDirectChild

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

  #### Parameters

  - ##### name: string

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

  #### Returns Promise<File | Tree>

### ls

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

- Implementation of UnixTree.ls

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

  #### Parameters

  - ##### path: Path

  #### Returns Promise<Links>

### mkdir

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

- Implementation of UnixTree.mkdir

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

  #### Parameters

  - ##### path: Path

  #### Returns Promise<BaseTree>

### mkdirRecurse

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

- Implementation of Tree.mkdirRecurse

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

  #### Parameters

  - ##### path: Path

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

  #### Returns Promise<BaseTree>

### mv

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

- Implementation of UnixTree.mv

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

  #### Parameters

  - ##### from: Path

  - ##### to: Path

  #### Returns Promise<BaseTree>

### put

- put(): Promise<CID>

- Implementation of Tree.put

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

  #### Returns Promise<CID>

### Abstract putDetailed

- putDetailed(): Promise<AddResult>

- Implementation of Tree.putDetailed

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

  #### Returns Promise<AddResult>

### read

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

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

  #### Parameters

  - ##### path: Path

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

### Abstract removeDirectChild

- removeDirectChild(name: string): BaseTree

- Implementation of Tree.removeDirectChild

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

  #### Parameters

  - ##### name: string

  #### Returns BaseTree

### rm

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

- Implementation of UnixTree.rm

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

  #### Parameters

  - ##### path: Path

  #### Returns Promise<BaseTree>

### rmRecurse

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

- Implementation of Tree.rmRecurse

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

  #### Parameters

  - ##### path: Path

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

  #### Returns Promise<BaseTree>

### updateChild

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

- Implementation of Tree.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<BaseTree>

### Abstract updateDirectChild

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

- Implementation of Tree.updateDirectChild

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

  #### Parameters

  - ##### child: File | Tree

  - ##### name: string

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

  #### Returns Promise<BaseTree>

### Abstract updateLink

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

- Implementation of Tree.updateLink

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

  #### Parameters

  - ##### name: string

  - ##### result: AddResult

  #### Returns BaseTree

### write

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

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

  #### Parameters

  - ##### path: Path

  - ##### content: FileContent

  #### Returns Promise<BaseTree>

Generated using TypeDoc