MCPcopy Create free account
hub / github.com/6dylan6/jdm / setLock

Method setLock

function/magic.js:522–534  ·  view source on GitHub ↗
(username, key)

Source from the content-addressed store, hash-verified

520 }
521
522 setLock(username, key) {
523 try {
524 try {
525 fs.accessSync(`/jd/log/lock`);
526 } catch (e) {
527 fs.mkdirSync(`/jd/log/lock`);
528 }
529 fs.mkdirSync(`/jd/log/lock/${key}_${username}`);
530 return false;
531 } catch (e) {
532 return true;
533 }
534 }
535
536 match(pattern, string) {
537 pattern = (pattern instanceof Array) ? pattern : [pattern];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected