MCPcopy Create free account
hub / github.com/ahaoboy/js-engine-benchmark / getFileSize

Function getFileSize

scripts/update.ts:214–229  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

212function getJavaSize() {
213 const v = [
214 "/usr/lib/jvm",
215 "C:/Program Files/Java",
216 "/Library/Java/JavaVirtualMachines",
217 "C:/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/21.0.7-6.0/x64",
218 "/opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.7-6/x64",
219 "/Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.7-6.0/x64/Contents/Home",
220 "/Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.7-6.0/arm64/Contents/Home",
221 ];
222
223 for (const i of v) {
224 try {
225 const n = +execSync(`du -s "${i}"`).toString().split("\t")[0].split(
226 " ",
227 )[0];
228 if (n > 0) {
229 return n * 1000;
230 }
231 } catch (e) {
232 // console.error('error: ', e.me)

Callers 2

getDllSizeFunction · 0.85
mainFunction · 0.85

Calls 2

isMsysFunction · 0.85
fromMsysPathFunction · 0.85

Tested by

no test coverage detected