INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Files viewed as persistent sequences of characters."
project: "Eiffel Kernel Library"
revision: "$Revision: 1.2 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: kernel
class FILE
inherit

TEXT_INPUT_STREAM
rename
is_open as is_open_read,
make as make_input_stream
undefine
copy,
dispose,
is_open_read,
read_buffer
redefine
close
end

TEXT_OUTPUT_STREAM
rename
is_open as is_open_write,
make as make_output_stream
undefine
copy,
dispose,
is_open_write,
put_buffer
redefine
close
end

FILE_STREAM
rename
end_of_stream as end_of_file
redefine
close,
make
end

STANDARD_INPUT_STREAM
rename
end_of_stream as end_of_file,
is_open as is_open_read,
make as make_open_stdin
undefine
is_open_read
redefine
close,
make_open_stdin
end

STANDARD_OUTPUT_STREAM
rename
is_open as is_open_write,
make as make_open_stdout
undefine
is_open_write
redefine
close,
make_open_stdout
end

STANDARD_ERROR_STREAM
rename
is_open as is_open_write,
make as make_open_stderr
undefine
is_open_write
redefine
close,
make_open_stderr
end
creation

make,
make_create_read_write,
make_open_append,
make_open_read,
make_open_read_write,
make_open_stderr,
make_open_stdin,
make_open_stdout,
make_open_write
feature {NONE}-- Creation

make (fn: STRING)
-- Create file object with 'fn' as file name
ensure
is_input_connected: input_stream = Current
is_output_connected: output_stream = Current

make_open_stdin
-- Create object for reading from standard input

make_open_stdout
-- Create object for reading from standard output

make_open_stderr
-- Create object for reading from standard error
feature -- Measurement

count: INTEGER
-- Size in bytes (0 if no assosiated physical file)
feature -- Status report

empty: BOOLEAN
-- Is structure empty?

is_plain_text: BOOLEAN
-- Is file reserved for text (character sequences)?
feature -- Status setting

close
feature -- Element change

change_name (new_name: STRING)
-- Change file name to 'new_name'
require
not_new_name_void: new_name /= void
file_exists: exists
file_closed: is_closed
ensure
name_changed: name.is_equal (new_name)
feature -- Removal

delete
-- Remove link with physical file
-- delete physical file if no more link
require
exists: exists
closed: is_closed
feature -- Compatibility: output

putbool (b: BOOLEAN)
obsolete "VE 3.3 compatibility, use put_boolean"
-- Write ASCII value of 'b' at current position

putchar (c: CHARACTER)
obsolete "VE 3.3 compatibility, use put_character"
-- Write 'c' at current position

putdouble (d: DOUBLE)
obsolete "VE 3.3 compatibility, use put_double"
-- Write ASCII value of 'd' at current position

putint (i: INTEGER)
obsolete "VE 3.3 compatibility, use put_integer"
-- Write ASCII value of 'i' at current position

putreal (r: REAL)
obsolete "VE 3.3 compatibility, use put_real"
-- Write ASCII value of 'r' at current position

putstring (s: STRING)
obsolete "VE 3.3 compatibility, use put_string"
-- Write 's' at current position
feature -- Compatibility: input

readchar
obsolete "VE 3.3 compatibility, use read_character"
-- Read a new character.
-- Make result available in 'last_character'

readdouble
obsolete "VE 3.3 compatibility, use read_double"
-- Read the ASCII representation of a new double from file.
-- Make result available in 'last_double'

readint
obsolete "VE 3.3 compatibility, use read_integer"
-- Read the ASCII representation of a new integer from file.
-- Make result available in 'last_integer'

readline
obsolete "VE 3.3 compatibility, use read_line"
-- Read a string until new line or end of file.
-- Make result available in 'last_string'.
-- New line will be consumed but not part of 'last_string'

readreal
obsolete "VE 3.3 compatibility, use read_real"
-- Read the ASCII representation of a new real from file.
-- Make result available in 'last_real'

readstream (nb_char: INTEGER)
obsolete "VE 3.3 compatibility, use read_stream"
-- Read a string of a most 'nb_char' bound characters or until end of file.
-- Make result available in 'last_string'

readword
obsolete "VE 3.3 compatibility, use read_word"
-- Read a new word from standard input.
-- Make result available in 'last_string'
invariant

name_exists: name /= void
name_not_empty: not name.is_empty
end -- class FILE

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES