'/proc/uptime' asFileReference readStreamDo: [ :stream | stream contents ]. is better way. but you will still get an empty string because actually â/procâ does not contains real files⦠so the file plugin does not applies there (and is another debate if it shouldâ¦) you should use OSProcess instead (installable from Configurations Browser) (PipeableOSProcess command: 'uptime') upToEndOfFile. Esteban
On 19 Mar 2015, at 07:07, Julien Delplanque <julien@tamere.eu> wrote:
Hi everyone,
I can't find out how to get the uptime of the OS from pharo.
I tried:
(FileLocator root / 'proc' / 'uptime') readStream contents.
and
(FileSystem disk root / 'proc' / 'uptime') readStream contents.
but all what I get is an empty string ''.
I don't know if there are messages in some specific classes to do this (in OSProcess for example?).
Thanks in advance.
Julien