MCPcopy Index your code
hub / github.com/acode/cli / load

Method load

cli/config.js:52–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 }
51
52 load () {
53 if (!fs.existsSync(this.fullpath())) {
54 let legacypath = this.legacypath();
55 if (legacypath) {
56 let legacydirs = legacypath.split(path.sep);
57 legacydirs.pop();
58 let legacydir = legacydirs.join(path.sep);
59 this.initialize(
60 legacydir,
61 this.read(legacypath)
62 )
63 } else {
64 this.write({});
65 }
66 }
67 return this.read();
68 }
69
70 initialize (workpath, data) {
71 data = data || {};

Callers 4

constructorMethod · 0.95
cli.jsFile · 0.45
local_http.jsFile · 0.45
runMethod · 0.45

Calls 5

fullpathMethod · 0.95
legacypathMethod · 0.95
initializeMethod · 0.95
readMethod · 0.95
writeMethod · 0.95

Tested by

no test coverage detected