MCPcopy Create free account
hub / github.com/ccxt/ccxt / checkCache

Function checkCache

cli/ts/cache.ts:89–110  ·  view source on GitHub ↗

*

()

Source from the content-addressed store, hash-verified

87 *
88 */
89function checkCache () {
90 loadMainConfigFile ();
91 const cachePath = getCacheDirectory ();
92 const marketsPath = path.join (cachePath, 'markets');
93 if (!fs.existsSync (cachePath)) {
94 try {
95 fs.mkdirSync (cachePath, {
96 'recursive': true,
97 });
98 } catch (e) {
99 log.red ('Error creating cache directory', cachePath);
100 }
101 } else if (!fs.existsSync (marketsPath)) {
102 try {
103 fs.mkdirSync (marketsPath, {
104 'recursive': true,
105 });
106 } catch (e) {
107 log.red ('Error creating cache directory', cachePath);
108 }
109 }
110}
111
112/**
113 *

Callers 1

runFunction · 0.85

Calls 2

loadMainConfigFileFunction · 0.85
getCacheDirectoryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…