/usr/share/mozart/doc/apptut/Webget.oz is in mozart-doc 1.4.0-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | functor
import
Application
Open
define
Args = {Application.getArgs record('in'(single type:string)
'out'(single type:string))}
Status = try
I={New Open.file init(url: Args.'in')}
O={New Open.file init(name: Args.'out'
flags:[write create truncate])}
in
local
proc {Copy}
S={I read(list:$)}
in
if S\="" then
{O write(vs:S)} {Copy}
end
end
in
{Copy}
end
0
catch _ then 1
end
{Application.exit Status}
end
|