Return the total size in bytes of all the files handled by this instance of fsdb.

        Fsdb does not use auxiliary data structure, so this function could be expensive.
        Look at _iter_over_paths() functions for more details.
496309
def size(self):
        
        tot = 0
        for p in self.__iter__(overPath=True):
            tot += os.path.getsize(p)
        return tot
865391
def size(self):
        """"""
        old = self.__file.tell()        # old position

        self.__file.seek(0, 2)          # end of file
        n_bytes = self.__file.tell()    # file size in bytes

        self.__file.seek(old)           # back to old position

        return n_bytes
1182776
def file_size(f):
    
    if isinstance(f, (six.string_types, six.text_type)):
        return os.path.getsize(f)
    else:
        cur = f.tell()
        f.seek(0, 2)
        size = f.tell()
        f.seek(cur)
        return size
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])
1369790
def sizeof(s):
    
    if hasattr(s, '_size_'):
        return s._size_

    elif isinstance(s, bytes):
        return len(s)

    raise ValueError(s)
479424
def size_on_copy(root="."):
    
    total_size = 0
    exclusions = exclusion_policy()
    for dirpath, dirnames, filenames in os.walk(root, topdown=True):
        current_exclusions = exclusions(dirpath, os.listdir(dirpath))
        # Modifying dirnames in-place will prune the subsequent files and
        # directories visited by os.walk. This is only possible when
        # topdown = True
        dirnames[:] = [d for d in dirnames if d not in current_exclusions]
        legit_files = [f for f in filenames if f not in current_exclusions]
        for f in legit_files:
            fp = os.path.join(dirpath, f)
            total_size += os.path.getsize(fp)
    return total_size
181110
def getDatabaseFileSize(self):
    
    if DISABLE_PERSISTENT_CACHING:
      return "?"
    size = os.path.getsize(self.__db_filepath)
    if size > 1000000000:
      size = "%0.3fGB" % (size / 1000000000)
    elif size > 1000000:
      size = "%0.2fMB" % (size / 1000000)
    elif size > 1000:
      size = "%uKB" % (size // 1000)
    else:
      size = "%uB" % (size)
    return size
460366
def filesize(fileobj):
    
    current = fileobj.tell()
    fileobj.seek(0, 2)
    end = fileobj.tell()
    fileobj.seek(current)
    return end
154164
def get_size(self):
    
    if not self._is_open:
      raise IOError('Not opened.')

    if self._uncompressed_stream_size is None:
      self._uncompressed_stream_size = self._GetUncompressedStreamSize()

    return self._uncompressed_stream_size
961683
def get_file_size(filename):
    
    if filename is None:
        return float(0)
    if type(filename) is list:
        return float(sum([get_file_size(x) for x in filename]))
    try:
        total_bytes = sum([float(os.stat(f).st_size)
                           for f in filename.split(" ") if f is not ''])
    except OSError:
        # File not found
        return 0.0
    else:
        return float(total_bytes) / (1024 ** 3)
3424
def size(f, unit='B', fileStore=None):
    
    divisor = return_bytes(unit)
    fileID = process_infile(f, fileStore)[0]
    return fileID.size / divisor
688513
def _calc_size(self):
        
        return sum(os.path.getsize(filename)
            for filename in self.walk()
        )
120754
def _get_file_size(file_path):
    

    size = getsize(file_path)

    file_size = bytearray(4)
    pack_into(b"I", file_size, 0, size)

    return file_size
484479
public Long getFileSizeAvg() {
        Long fileSizeAvg = 0L;
        if (items.size() != 0) {
            for (TableStat item : items) {
                if (item.getEndTime().equals(item.getStartTime())) {
                    fileSizeAvg += item.getFileSize();
                } else {
                    fileSizeAvg += item.getFileSize() * 1000
                                   / (item.getEndTime().getTime() - item.getStartTime().getTime());
                }
            }
            fileSizeAvg = fileSizeAvg / items.size();
        }
        return fileSizeAvg;
    }
877625
def size(self):
    
    import tensorflow as tf

    if self._size is None:
      self._size = 0
      options = tf.python_io.TFRecordOptions(tf.python_io.TFRecordCompressionType.GZIP)
      for tfexample_file in self.files:
        self._size += sum(1 for x
                          in tf.python_io.tf_record_iterator(tfexample_file, options=options))

    return self._size
1334398
def size(self):
        ''''''
        try:
            return os.fstat(self.file.fileno()).st_size
        except io.UnsupportedOperation:
            pass

        if is_seekable(self.file):
            with wpull.util.reset_file_offset(self.file):
                self.file.seek(0, os.SEEK_END)
                return self.file.tell()

        raise OSError('Unsupported operation.')
85835
public long getTransferSize() throws SftpStatusException, SshException {

		Object obj;
		long size = 0;
		SftpFile sftpfile;
		File file;
		for (Enumeration e = newFiles.elements(); e.hasMoreElements();) {
			obj = e.nextElement();
			if (obj instanceof File) {
				file = (File) obj;
				if (file.isFile()) {
					size += file.length();
				}
			} else if (obj instanceof SftpFile) {
				sftpfile = (SftpFile) obj;
				if (sftpfile.isFile()) {
					size += sftpfile.getAttributes().getSize().longValue();
				}
			}
		}
		for (Enumeration e = updatedFiles.elements(); e.hasMoreElements();) {
			obj = e.nextElement();

			if (obj instanceof File) {
				file = (File) obj;
				if (file.isFile()) {
					size += file.length();
				}
			} else if (obj instanceof SftpFile) {
				sftpfile = (SftpFile) obj;
				if (sftpfile.isFile()) {
					size += sftpfile.getAttributes().getSize().longValue();
				}
			}
		}

		// Add a value for deleted files??

		return size;
	}