|
|
@@ -24,9 +24,9 @@ func EnsureAbsolutePath(path, absoluteBase string) string { |
|
|
|
return filepath.Join(absoluteBase, path) |
|
|
|
} |
|
|
|
|
|
|
|
const notRegularFileMode os.FileMode = os.ModeDir | os.ModeSymlink | os.ModeNamedPipe | os.ModeSocket | os.ModeDevice | os.ModeCharDevice | os.ModeIrregular |
|
|
|
const notRegularFileMode os.FileMode = os.ModeSymlink | os.ModeNamedPipe | os.ModeSocket | os.ModeDevice | os.ModeCharDevice | os.ModeIrregular |
|
|
|
|
|
|
|
// GetDirectorySize returns the dumb disk consumption for a given path |
|
|
|
// GetDirectorySize returns the disk consumption for a given path |
|
|
|
func GetDirectorySize(path string) (int64, error) { |
|
|
|
var size int64 |
|
|
|
err := filepath.Walk(path, func(_ string, info os.FileInfo, err error) error { |