MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / move

Method move

packages/hydrooj/src/model/storage.ts:126–132  ·  view source on GitHub ↗
(src: string, dst: string)

Source from the content-addressed store, hash-verified

124 }
125
126 static async move(src: string, dst: string) {
127 const res = await StorageModel.coll.findOneAndUpdate(
128 { path: src, autoDelete: null },
129 { $set: { path: dst } },
130 );
131 return !!res;
132 }
133
134 static async exists(path: string) {
135 const value = await StorageModel.coll.findOne({ path, autoDelete: null });

Callers 1

registerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected