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

Function GetRemainingFolderSpace

utils/get_remaining_folder_space.go:7–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5)
6
7func GetRemainingFolderSpace() (int64, error) {
8 mainFolderSize, _, err := GetDirectorySize(config.Config.Folder)
9
10 if err != nil {
11 return 0, err
12 }
13
14 fileCount := GetActiveFileCount()
15 editorUsage := int64(fileCount * 200 * 1024)
16
17 return config.Config.SizeBytes - (mainFolderSize + editorUsage), nil
18}

Callers 6

HandleWebsocketFunction · 0.92
ReadFileFunction · 0.92
RecoverItemFunction · 0.92
CreateCopyFunction · 0.92
UnzipFunction · 0.85
ZipFunction · 0.85

Calls 2

GetDirectorySizeFunction · 0.85
GetActiveFileCountFunction · 0.85

Tested by

no test coverage detected