[Lazarus] Reworked ReadFileToString to support Linux virtual files
Michael Van Canneyt
michael at freepascal.org
Sat Nov 9 09:11:11 CET 2019
On Sat, 9 Nov 2019, AlexeyT via lazarus wrote:
> https://bugs.freepascal.org/view.php?id=36145
>
> Last attached demo contains my reworked function (after the fix it works
> pretty fast, i tested it). Can you apply at least this function? The
> issue can be opened - issue is about IDE. The function is reworked to
> support Linux virtual files like /proc/version, /proc/meminfo.
Concerning
"Btw, i could not make this func using "file of byte" or "file" types for BlockRead, in that cases i always got IOResult=5 (Access denied) so i 've used TextFile type (IOResult is ok)."
file of byte or untyped files are always opened read/write.
The FileMode variable can be set to avoid that.
Michael.
More information about the lazarus
mailing list