MCPcopy Create free account
hub / github.com/triggerdotdev/trigger.dev / getParsedFileSize

Function getParsedFileSize

apps/coordinator/src/index.ts:96–114  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

94}
95
96async function getParsedFileSize(filePath: string) {
97 const sizeInBytes = await getFileSize(filePath);
98
99 let message = `Size in bytes: ${sizeInBytes}`;
100
101 if (sizeInBytes > 1024 * 1024) {
102 const sizeInMB = (sizeInBytes / 1024 / 1024).toFixed(2);
103 message = `Size in MB (rounded): ${sizeInMB}`;
104 } else if (sizeInBytes > 1024) {
105 const sizeInKB = (sizeInBytes / 1024).toFixed(2);
106 message = `Size in KB (rounded): ${sizeInKB}`;
107 }
108
109 return {
110 path: filePath,
111 sizeInBytes,
112 message,
113 };
114}
115
116class Checkpointer {
117 #initialized = false;

Callers 1

#checkpointAndPushMethod · 0.85

Calls 1

getFileSizeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…