MCPcopy Create free account
hub / github.com/MertJSX/folderhost / GetDirectorySizeAsync

Function GetDirectorySizeAsync

utils/get_directory_size.go:25–36  ·  view source on GitHub ↗
(DirectoryPath string, id int, ch chan<- types.DirectorySizeOutput, wg *sync.WaitGroup)

Source from the content-addressed store, hash-verified

23}
24
25func GetDirectorySizeAsync(DirectoryPath string, id int, ch chan<- types.DirectorySizeOutput, wg *sync.WaitGroup) {
26 defer wg.Done()
27
28 size, sizeStr, err := GetDirectorySize(DirectoryPath)
29
30 ch <- types.DirectorySizeOutput{
31 SizeBytes: size,
32 Size: sizeStr,
33 Id: id,
34 Error: err,
35 }
36}

Callers 1

GetDirectoryItemsFunction · 0.85

Calls 1

GetDirectorySizeFunction · 0.85

Tested by

no test coverage detected