Returns the total size of the directories provided
191894
def size_of(directories)
      size = 0
      files_in(directories).each do |f|
        size += File.size(f)
      end
      size
    end
634527
public static function directory_size($dir)
    {
        $size = 0;
        foreach(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir, \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::SKIP_DOTS)) as $file => $key) {
            if ($key->isFile()) {
                $size += $key->getSize();
            }
        }
        return $size;
    }
940275
def get_data_length(self):
        # type: () -> int
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('Directory Record not yet initialized')
        if self.inode is not None:
            return self.inode.get_data_length()
        return self.data_length
820283
def size(self):
        ''''''
        num_enabled_connections = sum([1 for cg in self.connections.values() if cg.enabled is True])
        return len(self.nodes), num_enabled_connections
1224667
def get_disk_space(start_path='.'):
    
    total_size = 0
    for root, dname_list, fname_list in os.walk(start_path):
        for fname in fname_list:
            fpath = os.path.join(root, fname)
            try:
                total_size += os.path.getsize(fpath)
            except OSError:
                pass
    return total_size
1102877
def path_size(p: tcod.path.AStar) -> int:
    
    return int(lib.TCOD_path_size(p._path_c))
1269474
def _dir_size(directory):
  """"""
  size = 0
  for elem in tf_v1.gfile.ListDirectory(directory):
    elem_full_path = os.path.join(directory, elem)
    stat = tf_v1.gfile.Stat(elem_full_path)
    size += _dir_size(elem_full_path) if stat.is_directory else stat.length
  return size
1169286
public function getRootTotalSize()
	{
		$path = rtrim($this->rootWrapperPath, '/') . '/';
		$result = $this->getDirSummary($path);
		return $result['size'];
	}
1228563
def size(args):
    
    from jcvi.utils.cbook import human_size

    p = OptionParser(size.__doc__)
    fp = sys.stdin

    results = []
    for link_name in fp:
        link_name = link_name.strip()
        if not op.islink(link_name):
            continue

        source = get_abs_path(link_name)

        link_name = op.basename(link_name)
        filesize = op.getsize(source)
        results.append((filesize, link_name))

    # sort by descending file size
    for filesize, link_name in sorted(results, reverse=True):
        filesize = human_size(filesize, a_kilobyte_is_1024_bytes=True)
        print("%10s\t%s" % (filesize, link_name), file=sys.stderr)
633932
def Size(self):
        
        return s.uint8 + s.uint8 + GetVarSize(self.Attributes) + GetVarSize(self.inputs) + GetVarSize(self.outputs) + GetVarSize(self.Scripts)
1174234
def size(self):
        
        if self._instrs is []:
            return None

        return sum([instr.size for instr in self._instrs])
895402
def path_total_size(path_: str) -> int:
    """"""
    if path.isfile(path_):
        return path.getsize(path_)
    total_size = 0
    for root_dir, _, files in os.walk(path_):
        for file_ in files:
            total_size += path.getsize(path.join(root_dir, file_))
    return total_size
113942
function(formId, fileSizes) {
        var totalFileSizes = 0;

        for (var fileSizeIdx = 0; fileSizeIdx < fileSizes.length ; fileSizeIdx++) {
          totalFileSizes += fileSizes[fileSizeIdx];
        }

        return totalFileSizes;
      }
1177150
def size_on_disk(self):
        
        return int(self.connection.query(
            """
            SELECT SUM(data_length + index_length)
            FROM information_schema.tables WHERE table_schema='{db}'
            """.format(db=self.database)).fetchone()[0])
64755
public int size() {
		int size = 0;
		for (SourceFolder sourceFolder : this.sourceFolders.values()) {
			size += sourceFolder.getFiles().size();
		}
		return size;
	}
786058
def getsize(path, recurse=False):
    """"""
    if not op.isdir(path):
        return op.getsize(path)
    size = 0
    for r,_,fs in os.walk(path):
        for f in fs:
            size += getsize(op.join(r,f))
        if not recurse:
            break
    return size
1038299
def file_sizes(self):
        """"""
        size = sum(map(os.path.getsize, self.file_list))
        return size / 1024 / 1024