File: common

package info (click to toggle)
libtpms 0.10.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,188 kB
  • sloc: ansic: 120,340; makefile: 829; sh: 336; cpp: 125
file content (14 lines) | stat: -rw-r--r-- 232 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# SPDX-License-Identifier: BSD-3-Clause

# Get the size of a file in bytes
#
# @1: filename
function get_filesize()
{
	if [[ "$(uname -s)" =~ (Linux|CYGWIN_NT-|GNU) ]]; then
		stat -c%s "$1"
	else
		# OpenBSD
		stat -f%z "$1"
	fi
}