func GetConsumption(path string) (*resource.Quantity, error) {
	// Note that we actually need to hold the lock at least through
	// running the quota command, so it can't get recycled behind our back
	quotaLock.Lock()
	defer quotaLock.Unlock()
	applier := getApplier(path)
	// No applier means directory is not under quota management
	if applier == nil {
		return nil, nil
	}
	ibytes, err := applier.GetConsumption(path, dirQuotaMap[path])
	if err != nil {
		return nil, err
	}
	return resource.NewQuantity(ibytes, resource.DecimalSI), nil
}
// GetConsumption -- retrieve the consumption (in bytes) of the directory
- retrieve the consumption (in bytes) of the directory
// GetConsumption -- retrieve the consumption ( in bytes ) of the directory
func GetConsumption(path string) (*resource.Quantity, error) {
	quotaLock.Lock()
	defer quotaLock.Unlock()
	applier := getApplier(path)
	if applier == nil {
		return nil, nil
	}
	ibytes, err := applier.GetConsumption(path, dirQuotaMap[path])
	if err != nil {
		return nil, err
	}
	return resource.NewQuantity(ibytes, resource.DecimalSI), nil
}
func GetConsumption ( path string ) ( * resource . Quantity , error ) { quotaLock . Lock ( ) defer quotaLock . Unlock ( ) applier := getApplier ( path ) if applier == nil { return nil , nil } ibytes , err := applier . GetConsumption ( path , dirQuotaMap [ path ] ) if err != nil { return nil , err } return resource . NewQuantity ( ibytes , resource . DecimalSI ) , nil }
retrieve the consumption (in bytes) of the directory
retrieve the consumption ( in bytes ) of the directory
// Note that we actually need to hold the lock at least through // running the quota command, so it can't get recycled behind our back // No applier means directory is not under quota management