(self, path)
TODO: Docstring for available_space_for_path

        @param path TODO

        @return TODO
TODO: Docstring for available_space_for_path
TODO : Docstring for available_space_for_path
def available_space_for_path(self, path):
        """
        TODO: Docstring for available_space_for_path

        @param path TODO

        @return TODO
        """
        mount_path = self._mount_for_path(path)
        if(mount_path in self._mounts):
            reservations = list(self._mounts[mount_path]['reservations'].values())
            reservation_total = sum(reservations)
            consumed_total = 0
            for filepath in self._mounts[mount_path]['reservations']:
                try:
                    consumed_total += os.path.getsize(filepath)
                except os.error:
                    self.log.warn('%s does not exist.' % filepath)
            remaining = reservation_total - consumed_total
            stat = os.statvfs(path)
            available = stat.f_bavail * stat.f_frsize
            return available - (remaining if remaining > 0 else 0)
        else:
            return None
def available_space_for_path ( self , path ) : mount_path = self . _mount_for_path ( path ) if ( mount_path in self . _mounts ) : reservations = list ( self . _mounts [ mount_path ] [ 'reservations' ] . values ( ) ) reservation_total = sum ( reservations ) consumed_total = 0 for filepath in self . _mounts [ mount_path ] [ 'reservations' ] : try : consumed_total += os . path . getsize ( filepath ) except os . error : self . log . warn ( '%s does not exist.' % filepath ) remaining = reservation_total - consumed_total stat = os . statvfs ( path ) available = stat . f_bavail * stat . f_frsize return available - ( remaining if remaining > 0 else 0 ) else : return None