note description: "Files viewed as persistent sequences of ASCII characters" library: "Free implementation of ELKS library" status: "See notice at end of class." legal: "See notice at end of class." date: "$Date: 2020-05-28 16:02:59 +0000 (Thu, 28 May 2020) $" revision: "$Revision: 104378 $" class interface PLAIN_TEXT_FILE create make, make_with_name, make_with_path, make_open_read, make_open_write, make_open_append, make_open_read_write, make_create_read_write, make_open_read_append, make_open_temporary, make_open_temporary_with_prefix feature -- Initialization make_with_name (fn: READABLE_STRING_GENERAL) -- Create file object with fn as file name. make_with_path (a_path: PATH) -- Create file object with a_path as path. feature -- Status report is_plain_text: BOOLEAN -- Is file reserved for text (character sequences)? (Yes) Support_storable: BOOLEAN = False -- Can medium be used to store an Eiffel structure? feature -- Output put_integer (i: INTEGER_32) -- Write ASCII value of i at current position. -- Was declared in PLAIN_TEXT_FILE as synonym of putint and put_integer_32. putint (i: INTEGER_32) -- Write ASCII value of i at current position. -- Was declared in PLAIN_TEXT_FILE as synonym of put_integer and put_integer_32. put_integer_32 (i: INTEGER_32) -- Write ASCII value of i at current position. -- Was declared in PLAIN_TEXT_FILE as synonym of put_integer and putint. put_integer_64 (i: INTEGER_64) -- Write ASCII value of i at current position. put_integer_16 (i: INTEGER_16) -- Write ASCII value of i at current position. put_integer_8 (i: INTEGER_8) -- Write ASCII value of i at current position. put_natural_64 (i: NATURAL_64) -- Write ASCII value of i at current position. put_natural (i: NATURAL_32) -- Write ASCII value of i at current position. -- Was declared in PLAIN_TEXT_FILE as synonym of put_natural_32. put_natural_32 (i: NATURAL_32) -- Write ASCII value of i at current position. -- Was declared in PLAIN_TEXT_FILE as synonym of put_natural. put_natural_16 (i: NATURAL_16) -- Write ASCII value of i at current position. put_natural_8 (i: NATURAL_8) -- Write ASCII value of i at current position. put_boolean (b: BOOLEAN) -- Write ASCII value of b at current position. -- Was declared in PLAIN_TEXT_FILE as synonym of putbool. putbool (b: BOOLEAN) -- Write ASCII value of b at current position. -- Was declared in PLAIN_TEXT_FILE as synonym of put_boolean. put_real (r: REAL_32) -- Write ASCII value of r at current position. -- Was declared in PLAIN_TEXT_FILE as synonym of putreal and put_real_32. putreal (r: REAL_32) -- Write ASCII value of r at current position. -- Was declared in PLAIN_TEXT_FILE as synonym of put_real and put_real_32. put_real_32 (r: REAL_32) -- Write ASCII value of r at current position. -- Was declared in PLAIN_TEXT_FILE as synonym of put_real and putreal. put_double (d: REAL_64) -- Write ASCII value d at current position. -- Was declared in PLAIN_TEXT_FILE as synonym of putdouble and put_real_64. putdouble (d: REAL_64) -- Write ASCII value d at current position. -- Was declared in PLAIN_TEXT_FILE as synonym of put_double and put_real_64. put_real_64 (d: REAL_64) -- Write ASCII value d at current position. -- Was declared in PLAIN_TEXT_FILE as synonym of put_double and putdouble. put_string_32 (s: READABLE_STRING_32) -- Write string s at current position. put_string_general (s: READABLE_STRING_GENERAL) -- Write string s at current position. require extendible: extendible non_void: s /= Void feature -- Input read_integer_64 -- Read the ASCII representation of a new 64-bit integer -- from file. Make result available in last_integer_64. read_integer -- Read the ASCII representation of a new 32-bit integer -- from file. Make result available in last_integer. -- Was declared in PLAIN_TEXT_FILE as synonym of readint and read_integer_32. readint -- Read the ASCII representation of a new 32-bit integer -- from file. Make result available in last_integer. -- Was declared in PLAIN_TEXT_FILE as synonym of read_integer and read_integer_32. read_integer_32 -- Read the ASCII representation of a new 32-bit integer -- from file. Make result available in last_integer. -- Was declared in PLAIN_TEXT_FILE as synonym of read_integer and readint. read_integer_16 -- Read the ASCII representation of a new 16-bit integer -- from file. Make result available in last_integer_16. read_integer_8 -- Read the ASCII representation of a new 8-bit integer -- from file. Make result available in last_integer_8. read_natural_64 -- Read the ASCII representation of a new 64-bit natural -- from file. Make result available in last_natural_64. read_natural -- Read the ASCII representation of a new 32-bit natural -- from file. Make result available in last_natural. -- Was declared in PLAIN_TEXT_FILE as synonym of read_natural_32. read_natural_32 -- Read the ASCII representation of a new 32-bit natural -- from file. Make result available in last_natural. -- Was declared in PLAIN_TEXT_FILE as synonym of read_natural. read_natural_16 -- Read the ASCII representation of a new 16-bit natural -- from file. Make result available in last_natural_16. read_natural_8 -- Read the ASCII representation of a new 8-bit natural -- from file. Make result available in last_natural_8. read_real -- Read the ASCII representation of a new real -- from file. Make result available in last_real. -- Was declared in PLAIN_TEXT_FILE as synonym of readreal and read_real_32. readreal -- Read the ASCII representation of a new real -- from file. Make result available in last_real. -- Was declared in PLAIN_TEXT_FILE as synonym of read_real and read_real_32. read_real_32 -- Read the ASCII representation of a new real -- from file. Make result available in last_real. -- Was declared in PLAIN_TEXT_FILE as synonym of read_real and readreal. read_double -- Read the ASCII representation of a new double -- from file. Make result available in last_double. -- Was declared in PLAIN_TEXT_FILE as synonym of readdouble and read_real_64. readdouble -- Read the ASCII representation of a new double -- from file. Make result available in last_double. -- Was declared in PLAIN_TEXT_FILE as synonym of read_double and read_real_64. read_real_64 -- Read the ASCII representation of a new double -- from file. Make result available in last_double. -- Was declared in PLAIN_TEXT_FILE as synonym of read_double and readdouble. read_to_string (a_string: STRING_8; pos, nb: INTEGER_32): INTEGER_32 -- Fill a_string, starting at position pos with at -- most nb characters read from current file. -- Return the number of characters actually read. feature -- Unicode input last_string_32: STRING_32 -- Last unicode string read. read_unicode_line -- Read a line as STRING_32. feature -- Encoding encoding: ENCODING -- Associated encoding. ensure encoding_not_void: Result /= Void Default_encoding: ENCODING -- Default value for encoding. ensure default_encoding_not_void: Result /= Void set_encoding (enc: like encoding) -- Set associated encoding with enc. require enc_not_void: enc /= Void ensure encoding_set: encoding = enc set_utf8_encoding -- Set encoding to UTF-8. ensure encoding_set: encoding = {SYSTEM_ENCODINGS}.utf8 detect_encoding -- Detect and update encoding according to BOM detection. require is_open_read put_encoding_bom -- Put Byte Order Mark (BOM) related to encoding. require is_open_write: is_open_write at_beginning: position = 0 invariant plain_text: is_plain_text note copyright: "Copyright (c) 1984-2020, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class PLAIN_TEXT_FILE
Generated by ISE EiffelStudio