parameters: (p)
docstring: Returns the number of bytes free under directory `p`
docstring_summary: Returns the number of bytes free under directory `p`
docstring_tokens: Returns the number of bytes free under directory p
function: def freespace(p):
      "Returns the number of bytes free under directory `p`"
      if sys.platform == 'win32':  # pragma: no cover
          # os.statvfs doesn't work on Windows
          import win32file
  
          secsPerClus, bytesPerSec, nFreeClus, totClus = win32file.GetDiskFreeSpace(
              p)
          return secsPerClus * bytesPerSec * nFreeClus
      else:
          r = os.statvfs(p)
          return r.f_frsize * r.f_bavail
function_tokens: def freespace ( p ) : if sys . platform == 'win32' : # pragma: no cover # os.statvfs doesn't work on Windows import win32file secsPerClus , bytesPerSec , nFreeClus , totClus = win32file . GetDiskFreeSpace ( p ) return secsPerClus * bytesPerSec * nFreeClus else : r = os . statvfs ( p ) return r . f_frsize * r . f_bavail