p-hatan/ mirror

pub repository

mirror.p-hatan.com

posix

0.2.0

Exposes the POSIX api on OSx and Linux

Download archive

Readme

Provides Dart access to the POSIX api for osx and linux system.


import 'package:posix/posix.dart';

int uid = getuid();

#Contributing

setters and getters

One of the first questsion is to whether we should use Dart's settings and getters:

e.g.


// getuid
int uid = getuid;

or

int uid = getuid();


/// setuid

uid = myuid;

or 

setuid = uid;

or

setuid(uid);

My initial thoughts is to make the api identical to the posix api which would mean that we don't use Dart setters and getters.

error returns

Do we return error no.s or do we throw.

As Dart is a modern language it uses Exception whereas posix returns erorr codes.

Often posix will return null and then expect you to make a separate call to 'errorno' to get the actually error no.

I'm inclined to bring the api that we expose into the modern world.

So I'm proposing that if an posix api returns an error that we throw a PosixException with a message and error code.

Changelog

0.2.0

generated code using ffigen.

0.1.0

Initial commit

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add posix
pubspec.yaml
name: posix
version: 0.2.0
homepage: https://github.com/bsutton/dart_posix
description: Exposes the POSIX api on OSx and Linux
environment: 
  sdk: '>=2.8.1 <3.0.0'
dependencies: 
  ffi: ^0.1.3
dev_dependencies: 
  pedantic: ^1.9.0
  test: ^1.14.4
  ffigen: ^1.0.2

Version history

VersionPublishedArchiveSHA-256
0.1.02020-09-19T23:05:37.303879ZDownload734df62a1b6909438f2ef3e3315cdb34e58878cd77c64ff3c15740dd52a1ae39
0.2.02020-09-20T09:20:15.962003ZDownloadab97e82fdf59537d33f1e71c976bd6e481c35050da25a3f663113875caf63895
0.3.02020-09-20T13:05:59.878051ZDownload05a899caf2d87d2c58edaccee287368d61510af241be4ca3d9e17b61f891576c
0.4.02020-09-21T13:14:42.392222ZDownloadf89860813edbb3b33a08b4769ea0d3ee30d85a871ca428b09af5a909a7cbf026
0.4.12020-09-22T13:35:12.816226ZDownloadbebe433866472311139b02b21138615a6c61e03c99614b518a1372550332e436
1.0.02021-01-18T00:19:20.052099ZDownload6648704ae3fe26a74e792fff7befb2908bd71129a53b661435fe1aa2ffb27b1e
1.1.02021-01-19T11:36:06.041207ZDownload41d9de908fb58b9acca8c0c05991f93a463b50d3a0be0f065cbfa89d788db624
1.2.02021-01-19T12:22:31.244163ZDownloadd21e195d1462c556249054ffe71e97318eb46ee18d5bf08f4da6e7eddf320fbd
1.3.02021-01-21T05:54:35.762023ZDownload794cdfcba98917ec2b8550f33f6ab7dc8af65e0f122e96efac9f186399671d6a
1.3.12021-02-03T04:01:00.356019ZDownload84e0e06a7892d0cc840b5b8fc9117e0623656ec427307cb5ca6472b7010fdc2a
1.3.22021-02-03T05:02:01.775892ZDownload3c590798d778857c0cee60f4c13ea2438bf327bcd3a9d4ee2e91a761dca4cc63
1.3.32021-02-15T23:17:03.133852ZDownload360942fa877af33bffe73fb76a75a84f13672c7378bb271e02809d6a68b4bae4
1.3.42021-02-15T23:57:24.282186ZDownload031639fc453297bdd79df6dc5120f2c93bf53cc7b5f89184d3941ba86b21821c
2.0.0-nullsafety.12021-02-17T02:11:54.352499ZDownloadf57849fa2149e53efeb677e4cbeb1917191eed34e59dd686a0c11e8bb0f44983
2.0.02021-02-18T22:27:44.593380ZDownload64c1b8e4448812aa564ae5970e77dce69080a26edaebcd11c77df10e1ab4c9b3
2.1.02021-05-09T13:04:00.915170ZDownload71dce0b71366ed61d8cbb4fd3a8e800dae9f942a233e12b181c2364889e74121
2.1.12021-06-06T11:53:20.478833ZDownload716e9e522b0b32bafff8067c965d2aa51c0ed5d370c2dd4f86afbe4910ff5050
2.1.22021-06-06T11:57:03.009598ZDownloada2e49609883a8fd97e905b43bc4ee526463672ed28eea38d40d68f2afbd84c69
2.2.02021-11-03T11:44:34.566383ZDownloada152a49b66fb86194bff5031e3ed4fd2e29db139aba728b808e17fb29e128862
2.2.12021-11-17T03:14:00.576621ZDownload59cd50f48a81ec5bbca3e6a34e659500f7422f8cb56936aa790202708153f145
2.2.22021-12-02T02:20:04.382149ZDownload5fca68d247bda9e7fdfdd4637f5fd90646b69a9d171d60c5d37cbfbf6966766d
2.2.32021-12-07T20:36:39.399217ZDownload6446ba818315c21e0fab0c638d3a45948c4d473a11761bdd1782c00305de98a6
3.0.02021-12-13T21:23:44.399333ZDownloada5708ed769316ea877ad99d002f20d9e20401f99da01cb360b7c4cc53db3c395
3.1.02022-04-11T07:13:29.430528ZDownload8ef816a60077a3be3bbb20a3fac32e642c24f8a6d79ffc3ad3b2b84d9063b9e7
4.0.02022-07-13T00:12:23.087792ZDownload658671e46ef694ef907465719a33aa6745c4a80e34cc49e53eb4a7d4363acd89
4.0.12022-10-14T21:36:46.298596ZDownloadb1c7bba4fa7788a9db2e922b7823003f5a720b928e7b0a274e7d8285ca3ce6bf
4.1.02022-10-21T21:08:50.610748ZDownload203e3ad9df376927118dc662e1724dde1f64e2c3292cd59a8082d4a2de84bb70
5.0.02023-05-12T22:35:07.676799ZDownload3ad26924254fd2354b0e2b95fc8b45ac392ad87434f8e64807b3a1ac077f2256
6.0.02023-11-14T23:21:00.124586ZDownloadb9951567834165152e5e78c42f3f91d7f94616a498ff0c172680eda07b65c9a6
6.0.12023-11-14T23:42:26.992335ZDownloada0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a
6.0.22025-04-18T00:11:42.791090ZDownloadf0d7856b6ca1887cfa6d1d394056a296ae33489db914e365e2044fdada449e62
6.0.32025-06-28T02:01:27.604416ZDownload6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61
6.5.02026-02-22T07:58:49.581102ZDownload185ef7606574f789b40f289c233efa52e96dead518aed988e040a10737febb07
6.5.12026-07-24T00:13:14.434661ZDownloadbebff4a1df009c2331c08ffb3a3b9e8f26733b4a0de34b23dbb07b1b8af21979
6.5.22026-07-24T02:47:24.716697ZDownloadbc1bad54ad2b735816e31f8d4600cfde6c7839975085ddfbca48b6c9f7c4044e
6.5.32026-10-25T20:10:22.272414ZDownload6312deb534ce3812a1b454143740ffe721a17dc3a33bfc978f3a6d7bc5833edf
6.5.42026-10-28T02:04:07.999185ZDownload613646d076944f3acc125830af935b48d4b8a57a388691547bbfd25b434f4d63

Dependencies

ffi "^0.1.3"