Logiweb(TM)

7.16.7 fileRead, and fileTypeRead

Prev Up Next Page 278 of 800 Search internet


A fileRead request queries the contents of the file with path p:

eager define fileRead ( p ) as lgcio ( FileRead :: p :: EOS ) end define

The reply has form

<< << r ,, i >> ,, p >>

where r and i are the reference and index, respectively, of the lgcio construct and p is the contents of the file expressed as a singleton list.

If the file is not readable the lgcio-interface prints an error message and exits.

A fileTypeRead request is similar but survives if the file is not readable. The reply p comprises a FileTypeNonexistent byte if the file could not be read and a FileTypeRegular byte followed by the bytes of the file otherwise.

Prev Up Next Page 278 of 800 Search logiweb.eu

Copyright © 2010 Klaus Grue, GRD-2010-01-05