MCPcopy
hub / github.com/jvilk/BrowserFS / initialize

Method initialize

src/core/FS.ts:139–144  ·  view source on GitHub ↗
(rootFS: FileSystem)

Source from the content-addressed store, hash-verified

137 private nextFd = 100;
138
139 public initialize(rootFS: FileSystem): FileSystem {
140 if (!(<any> rootFS).constructor.isAvailable()) {
141 throw new ApiError(ErrorCode.EINVAL, 'Tried to instantiate BrowserFS with an unavailable file system.');
142 }
143 return this.root = rootFS;
144 }
145
146 /**
147 * converts Date or number to a fractional UNIX timestamp

Callers

nothing calls this directly

Calls 1

isAvailableMethod · 0.65

Tested by

no test coverage detected