stdlibc

Creator: coderz1093

Last updated:

Add to Cart

Description:

stdlibc

stdlibc.dart #




Standard C Library - FFI bindings to the GNU C Library on Linux, and the BSD
C Library on macOS.
import 'package:stdlibc/stdlibc.dart';

void main() {
if (geteuid() == 0) {
print('WARNING: running as root');
}

final utsname = uname();
print('System: ${utsname.sysname} (${utsname.nodename})');
print('Version: ${utsname.release} (${utsname.machine})');

final info = sysinfo();
print('Uptime: ${info.uptime}');
print('Load average: ${info.loads[0] / (1 << SI_LOAD_SHIFT)}');
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.