diff --git a/documentation/17.01/solutions/basic-computing/eiffelbase/eiffelbase-tutorial/eiffelbase-kernel.wiki b/documentation/17.01/solutions/basic-computing/eiffelbase/eiffelbase-tutorial/eiffelbase-kernel.wiki index 7ca7fe29..3d85692a 100644 --- a/documentation/17.01/solutions/basic-computing/eiffelbase/eiffelbase-tutorial/eiffelbase-kernel.wiki +++ b/documentation/17.01/solutions/basic-computing/eiffelbase/eiffelbase-tutorial/eiffelbase-kernel.wiki @@ -312,16 +312,14 @@ FILE describes the notion of sequential file viewed as a data structure which fi The class declaration defines files as unbounded sequences of characters. This means that you will find in FILE all the operations on sequential data structures that you have come to know and love by reading this documentation - at least, all that apply. Just as stacks and linked lists, files have put, extend, has, item and so on. More specific to files are the typed input and output operations. For output, you will find put_character, put_integer, put_real, put_double and put_string, as well as new_line. For input you will find read_integer and its co-conspirators. {{caution|Note the application to input features of the command-query separation principle.
-The input features such as read_integer do not by themselves return a result; they set the values of queries such as last_integer. So the normal way to read is through two operations:
-
-my_file.read_integer
-new_value := my_file.last_integer }} +The input features such as read_integer do not by themselves return a result; they set the values of queries such as last_integer. So the normal way to read is through two operations:
+     my_file.read_integer
+     new_value := my_file.last_integer}} Queries are available to determine the status of a file, in particular exists, is_readable, is_executable, is_writable, is_creatable, is_closed, is_open_read and so on. -{{caution|You will notice in the flat-short form that all these queries except the first have exists as a precondition. This precondition is good for efficiency since it saves an existence test - a relatively expensive operation - when you know that a certain file exists. But it also means that if you have any doubt about the file's existence you must use the queries in the style
-
-if my_file.exists and then my_file.is_readable then... }} +{{caution|You will notice in the flat-short form that all these queries except the first have exists as a precondition. This precondition is good for efficiency since it saves an existence test - a relatively expensive operation - when you know that a certain file exists. But it also means that if you have any doubt about the file's existence you must use the queries in the style
+if my_file.exists and then my_file.is_readable then ...}} FILE is a deferred class. Various implementations are possible. A quite detailed one is PLAIN_TEXT_FILE, which adds many features for accessing reading and writing data from/to a file.