parameters: (self)
docstring: Write .sizes file with info about number and size of files.
docstring_summary: Write .sizes file with info about number and size of files.
docstring_tokens: Write . sizes file with info about number and size of files .
function: def _addSizes(self):
          "Write .sizes file with info about number and size of files."
  
          # Not sure if this is correct, but 'installedSize' and
          # 'zippedSize' are now in Bytes. Maybe blocks are needed?
          # Well, Installer.app doesn't seem to care anyway, saying
          # the installation needs 100+ MB...
  
          numFiles = 0
          installedSize = 0
          zippedSize = 0
  
          files = GlobDirectoryWalker(self.sourceFolder)
          for f in files:
              numFiles = numFiles + 1
              installedSize = installedSize + os.lstat(f)[6]
  
          try:
              zippedSize = os.stat(self.archPath+ ".gz")[6]
          except OSError: # ignore error
              pass
          base = self.packageInfo["Title"] + ".sizes"
          f = open(join(self.packageResourceFolder, base), "w")
          format = "NumFiles %d\nInstalledSize %d\nCompressedSize %d\n"
          f.write(format % (numFiles, installedSize, zippedSize))
function_tokens: def _addSizes ( self ) : # Not sure if this is correct, but 'installedSize' and # 'zippedSize' are now in Bytes. Maybe blocks are needed? # Well, Installer.app doesn't seem to care anyway, saying # the installation needs 100+ MB... numFiles = 0 installedSize = 0 zippedSize = 0 files = GlobDirectoryWalker ( self . sourceFolder ) for f in files : numFiles = numFiles + 1 installedSize = installedSize + os . lstat ( f ) [ 6 ] try : zippedSize = os . stat ( self . archPath + ".gz" ) [ 6 ] except OSError : # ignore error pass base = self . packageInfo [ "Title" ] + ".sizes" f = open ( join ( self . packageResourceFolder , base ) , "w" ) format = "NumFiles %d\nInstalledSize %d\nCompressedSize %d\n" f . write ( format % ( numFiles , installedSize , zippedSize ) )