MCPcopy Create free account
hub / github.com/cloudflare/agents / mv

Method mv

packages/shell/src/memory.ts:264–276  ·  view source on GitHub ↗
(
    src: string,
    dest: string,
    options?: StateMoveOptions
  )

Source from the content-addressed store, hash-verified

262 }
263
264 async mv(
265 src: string,
266 dest: string,
267 options?: StateMoveOptions
268 ): Promise<void> {
269 const stat = await this.stat(src);
270 if (stat?.type === "directory" && !options?.recursive) {
271 throw new Error(
272 `EISDIR: cannot move directory without recursive: ${src}`
273 );
274 }
275 await this.fs.mv(src, dest);
276 }
277
278 async symlink(target: string, linkPath: string): Promise<void> {
279 await this.fs.symlink(target, linkPath);

Callers

nothing calls this directly

Calls 2

statMethod · 0.95
mvMethod · 0.65

Tested by

no test coverage detected