MCPcopy Create free account
hub / github.com/HumbleUI/JWM / fetch

Function fetch

script/build_utils.py:147–154  ·  view source on GitHub ↗
(url, file)

Source from the content-addressed store, hash-verified

145 sys.exit(process.returncode)
146
147def fetch(url, file):
148 if not os.path.exists(file):
149 print('Downloading', url, flush=True)
150 data = urllib.request.urlopen(url).read()
151 if os.path.dirname(file):
152 makedirs(os.path.dirname(file))
153 with open(file, 'wb') as f:
154 f.write(data)
155
156def fetch_maven(group, name, version, classifier=None, repo='https://repo1.maven.org/maven2'):
157 path = '/'.join([group.replace('.', '/'), name, version, name + '-' + version + ('-' + classifier if classifier else '') + '.jar'])

Callers 1

fetch_mavenFunction · 0.85

Calls 1

makedirsFunction · 0.85

Tested by

no test coverage detected