eiffelroom

I/O

library

EiffelStore

This library is a part of the EiffelStudio package
Interface to relational databases.
article

Reading File Content

In this tutorial I'll briefly explain how one can load the content of an ASCII file into a single string.

The deferred class FILE cannot be used directly as it is deferred.

The descendant PLAIN_TEXT_FILE is what we're actually looking for.

Basic steps

The basic steps are the following:
local
      l_file: PLAIN_TEXT_FILE
      l_content: STRING
   do
      create l_file.make_create_read_write (a_path)
      l_file.read_stream (l_file.count)
      l_content := l_file.last_string.twin
      l_file.close
   end

library

EPOM

This library is a part of the SAFE package
Eiffel Persistent Object Management - a pragmatic and simple framework.
library

ECLI

This library is a part of the SAFE package
Relational databases access in Eiffel (x/open Call Level Interface, aka ODBC).
library

EiffelNet

This library is a part of the EiffelStudio package
Networking library.
library

ePOSIX

the complete Eiffel to POSIX binding
Syndicate content
about - contact