indexing
description: "Files, viewed as persistent sequences of bytes"
status: "See notice at end of class"
date: "$Date$"
revision: "$Revision$"
class interface
RAW_FILE
create
make (fn: STRING)
fn
FILE
require FILE
string_exists: fn /= void
string_not_empty: not fn.is_empty
ensure FILE
file_named: name.is_equal (fn)
file_closed: is_closed
make_open_read (fn: STRING)
fn
FILE
require FILE
string_exists: fn /= void
string_not_empty: not fn.is_empty
ensure FILE
exists: exists
open_read: is_open_read
make_open_write (fn: STRING)
fn
FILE
require FILE
string_exists: fn /= void
string_not_empty: not fn.is_empty
ensure FILE
exists: exists
open_write: is_open_write
make_open_append (fn: STRING)
fn
FILE
require FILE
string_exists: fn /= void
string_not_empty: not fn.is_empty
ensure FILE
exists: exists
open_append: is_open_append
make_open_read_write (fn: STRING)
fn
FILE
require FILE
string_exists: fn /= void
string_not_empty: not fn.is_empty
ensure FILE
exists: exists
open_read: is_open_read
open_write: is_open_write
make_create_read_write (fn: STRING)
fn
FILE
require FILE
string_exists: fn /= void
string_not_empty: not fn.is_empty
ensure FILE
exists: exists
open_read: is_open_read
open_write: is_open_write
make_open_read_append (fn: STRING)
fn
FILE
require FILE
string_exists: fn /= void
string_not_empty: not fn.is_empty
ensure FILE
exists: exists
open_read: is_open_read
open_append: is_open_append
feature
make (fn: STRING)
fn
FILE
require FILE
string_exists: fn /= void
string_not_empty: not fn.is_empty
ensure FILE
file_named: name.is_equal (fn)
file_closed: is_closed
make_create_read_write (fn: STRING)
fn
FILE
require FILE
string_exists: fn /= void
string_not_empty: not fn.is_empty
ensure FILE
exists: exists
open_read: is_open_read
open_write: is_open_write
make_open_append (fn: STRING)
fn
FILE
require FILE
string_exists: fn /= void
string_not_empty: not fn.is_empty
ensure FILE
exists: exists
open_append: is_open_append
make_open_read (fn: STRING)
fn
FILE
require FILE
string_exists: fn /= void
string_not_empty: not fn.is_empty
ensure FILE
exists: exists
open_read: is_open_read
make_open_read_append (fn: STRING)
fn
FILE
require FILE
string_exists: fn /= void
string_not_empty: not fn.is_empty
ensure FILE
exists: exists
open_read: is_open_read
open_append: is_open_append
make_open_read_write (fn: STRING)
fn
FILE
require FILE
string_exists: fn /= void
string_not_empty: not fn.is_empty
ensure FILE
exists: exists
open_read: is_open_read
open_write: is_open_write
make_open_write (fn: STRING)
fn
FILE
require FILE
string_exists: fn /= void
string_not_empty: not fn.is_empty
ensure FILE
exists: exists
open_write: is_open_write
feature
access_date: INTEGER
FILE
require FILE
file_exists: exists
date: INTEGER
FILE
require FILE
file_exists: exists
descriptor: INTEGER
FILE
require IO_MEDIUM
valid_handle: descriptor_available
require else FILE
file_opened: not is_closed
descriptor_available: BOOLEAN
FILE
file_info: UNIX_FILE_INFO
FILE
file_pointer: POINTER
FILE
group_id: INTEGER
FILE
require FILE
file_exists: exists
has (v: like item): BOOLEAN
v
object_comparison
LINEAR
ensure CONTAINER
not_found_in_empty: Result implies not is_empty
index_of (v: like item; i: INTEGER): INTEGER
iv
object_comparison
LINEAR
require LINEAR
positive_occurrences: i > 0
ensure LINEAR
non_negative_result: Result >= 0
inode: INTEGER
FILE
require FILE
file_exists: exists
item: CHARACTER
FILE
require TRAVERSABLE
not_off: not off
require ACTIVE
readable: readable
links: INTEGER
FILE
require FILE
file_exists: exists
name: STRING
FILE
occurrences (v: CHARACTER): INTEGER
v
object_comparison
LINEAR
ensure BAG
non_negative_occurrences: Result >= 0
owner_name: STRING
FILE
require FILE
file_exists: exists
position: INTEGER
FILE
protection: INTEGER
FILE
require FILE
file_exists: exists
retrieved: ANY
Retrieve_exception
FILE
require IO_MEDIUM
exists: exists
is_open_read: is_open_read
support_storable: support_storable
ensure IO_MEDIUM
result_exists: Result /= void
separator: CHARACTER
ASCII
FILE
user_id: INTEGER
FILE
require FILE
file_exists: exists
feature
count: INTEGER
FILE
feature
access_exists: BOOLEAN
FILE
after: BOOLEAN
FILE
before: BOOLEAN
FILE
changeable_comparison_criterion: BOOLEAN
object_comparison
CONTAINER
end_of_file: BOOLEAN
FILE
require FILE
opened: not is_closed
exhausted: BOOLEAN
LINEAR
ensure LINEAR
exhausted_when_off: off implies Result
exists: BOOLEAN
FILE
ensure then FILE
unchanged_mode: mode = old mode
extendible: BOOLEAN
FILE
file_prunable: BOOLEAN
FILE
file_readable: BOOLEAN
FILE
file_writable: BOOLEAN
FILE
Full: BOOLEAN is False
FILE
is_access_executable: BOOLEAN
FILE
require FILE
file_exists: exists
is_access_owner: BOOLEAN
FILE
require FILE
file_exists: exists
is_access_readable: BOOLEAN
FILE
require FILE
file_exists: exists
is_access_writable: BOOLEAN
FILE
require FILE
file_exists: exists
is_block: BOOLEAN
FILE
require FILE
file_exists: exists
is_character: BOOLEAN
FILE
require FILE
file_exists: exists
is_closed: BOOLEAN
FILE
is_creatable: BOOLEAN
FILE
is_device: BOOLEAN
FILE
require FILE
file_exists: exists
is_directory: BOOLEAN
FILE
require FILE
file_exists: exists
is_empty: BOOLEAN
FINITE
is_executable: BOOLEAN
FILE
require IO_MEDIUM
handle_exists: exists
is_fifo: BOOLEAN
FILE
require FILE
file_exists: exists
is_inserted (v: CHARACTER): BOOLEAN
v
COLLECTION
is_open_append: BOOLEAN
FILE
is_open_read: BOOLEAN
FILE
is_open_write: BOOLEAN
FILE
is_owner: BOOLEAN
FILE
require FILE
file_exists: exists
is_plain: BOOLEAN
FILE
require FILE
file_exists: exists
is_plain_text: BOOLEAN
IO_MEDIUM
is_readable: BOOLEAN
FILE
require IO_MEDIUM
handle_exists: exists
is_setgid: BOOLEAN
FILE
require FILE
file_exists: exists
is_setuid: BOOLEAN
FILE
require FILE
file_exists: exists
is_socket: BOOLEAN
FILE
require FILE
file_exists: exists
is_sticky: BOOLEAN
FILE
require FILE
file_exists: exists
is_symlink: BOOLEAN
FILE
require FILE
file_exists: exists
is_writable: BOOLEAN
FILE
require IO_MEDIUM
handle_exists: exists
last_character: CHARACTER
read_character
IO_MEDIUM
last_double: DOUBLE
read_double
IO_MEDIUM
last_integer: INTEGER
read_integer
IO_MEDIUM
last_real: REAL
read_real
IO_MEDIUM
last_string: STRING
IO_MEDIUM
object_comparison: BOOLEAN
equal=
=
CONTAINER
off: BOOLEAN
FILE
readable: BOOLEAN
SEQUENCE
require ACTIVE
True
require IO_MEDIUM
handle_exists: exists
Support_storable: BOOLEAN is True
writable: BOOLEAN
SEQUENCE
feature
close
FILE
require IO_MEDIUM
medium_is_open: not is_closed
ensure then FILE
is_closed: is_closed
compare_objects
equal
=
CONTAINER
require CONTAINER
changeable_comparison_criterion
ensure CONTAINER
object_comparison
compare_references
=
equal
CONTAINER
require CONTAINER
changeable_comparison_criterion
ensure CONTAINER
reference_comparison: not object_comparison
create_read_write
FILE
require FILE
is_closed: is_closed
ensure FILE
exists: exists
open_read: is_open_read
open_write: is_open_write
fd_open_append (fd: INTEGER)
fd
FILE
ensure FILE
exists: exists
open_append: is_open_append
fd_open_read (fd: INTEGER)
fd
FILE
ensure FILE
exists: exists
open_read: is_open_read
fd_open_read_append (fd: INTEGER)
fd
FILE
ensure FILE
exists: exists
open_read: is_open_read
open_append: is_open_append
fd_open_read_write (fd: INTEGER)
fd
FILE
ensure FILE
exists: exists
open_read: is_open_read
open_write: is_open_write
fd_open_write (fd: INTEGER)
fd
FILE
ensure FILE
exists: exists
open_write: is_open_write
open_append
FILE
require FILE
is_closed: is_closed
ensure FILE
exists: exists
open_append: is_open_append
open_read
FILE
require FILE
is_closed: is_closed
ensure FILE
exists: exists
open_read: is_open_read
open_read_append
FILE
require FILE
is_closed: is_closed
ensure FILE
exists: exists
open_read: is_open_read
open_append: is_open_append
open_read_write
FILE
require FILE
is_closed: is_closed
ensure FILE
exists: exists
open_read: is_open_read
open_write: is_open_write
open_write
FILE
ensure FILE
exists: exists
open_write: is_open_write
recreate_read_write (fname: STRING)
fname
FILE
require FILE
is_open: not is_closed
valid_name: fname /= void
ensure FILE
exists: exists
open_read: is_open_read
open_write: is_open_write
reopen_append (fname: STRING)
fname
FILE
require FILE
is_open: not is_closed
valid_name: fname /= void
ensure FILE
exists: exists
open_append: is_open_append
reopen_read (fname: STRING)
fname
FILE
require FILE
is_open: not is_closed
valid_name: fname /= void
ensure FILE
exists: exists
open_read: is_open_read
reopen_read_append (fname: STRING)
fname
FILE
require FILE
is_open: not is_closed
valid_name: fname /= void
ensure FILE
exists: exists
open_read: is_open_read
open_append: is_open_append
reopen_read_write (fname: STRING)
fname
FILE
require FILE
is_open: not is_closed
valid_name: fname /= void
ensure FILE
exists: exists
open_read: is_open_read
open_write: is_open_write
reopen_write (fname: STRING)
fname
FILE
require FILE
is_open: not is_closed
valid_name: fname /= void
ensure FILE
exists: exists
open_write: is_open_write
feature
back
FILE
require BILINEAR
not_before: not before
finish
FILE
require LINEAR
True
require else FILE
file_opened: not is_closed
forth
FILE
require LINEAR
not_after: not after
require else FILE
file_opened: not is_closed
go (abs_position: INTEGER)
position
FILE
require FILE
file_opened: not is_closed
non_negative_argument: abs_position >= 0
move (offset: INTEGER)
offset
FILE
require FILE
file_opened: not is_closed
next_line
FILE
require FILE
is_readable: file_readable
recede (abs_position: INTEGER)
position
FILE
require FILE
file_opened: not is_closed
non_negative_argument: abs_position >= 0
search (v: like item)
itemv
v
exhausted
object_comparison
BILINEAR
ensure LINEAR
object_found: (not exhausted and object_comparison) implies equal (v, item)
item_found: (not exhausted and not object_comparison) implies v = item
start
FILE
require TRAVERSABLE
True
require else FILE
file_opened: not is_closed
feature
add_permission (who, what: STRING)
whowhat
FILE
require FILE
who_is_not_void: who /= void
what_is_not_void: what /= void
file_descriptor_exists: exists
append (f: like Current)
f
FILE
require SEQUENCE
argument_not_void: s /= void
require else FILE
target_is_closed: is_closed
source_is_closed: f.is_closed
ensure SEQUENCE
new_count: count >= old count
ensure then FILE
new_count: count = old count + f.count
files_closed: f.is_closed and is_closed
basic_store (object: ANY)
object
FILE
require IO_MEDIUM
object_not_void: object /= void
exists: exists
is_open_write: is_open_write
support_storable: support_storable
change_date: INTEGER
FILE
require FILE
file_exists: exists
change_group (new_group_id: INTEGER)
new_group_id
FILE
require FILE
file_exists: exists
change_mode (mask: INTEGER)
mask
FILE
require FILE
file_exists: exists
change_name (new_name: STRING)
new_name
FILE
require FILE
new_name_not_void: new_name /= void
file_exists: exists
ensure FILE
name_changed: name.is_equal (new_name)
change_owner (new_owner_id: INTEGER)
new_owner_id
FILE
require FILE
file_exists: exists
extend (v: CHARACTER)
v
FILE
require COLLECTION
extendible: extendible
ensure COLLECTION
item_inserted: is_inserted (v)
ensure then BAG
one_more_occurrence: occurrences (v) = old (occurrences (v)) + 1
fill (other: CONTAINER [CHARACTER])
other
other
COLLECTION
require COLLECTION
other_not_void: other /= void
extendible
flush
FILE
require FILE
is_open: not is_closed
force (v: like item)
v
SEQUENCE
require SEQUENCE
extendible: extendible
ensure then SEQUENCE
new_count: count = old count + 1
item_inserted: has (v)
general_store (object: ANY)
object
FILE
require IO_MEDIUM
object_not_void: object /= void
exists: exists
is_open_write: is_open_write
support_storable: support_storable
independent_store (object: ANY)
object
FILE
require IO_MEDIUM
object_not_void: object /= void
exists: exists
is_open_write: is_open_write
support_storable: support_storable
link (fn: STRING)
fn
fn
FILE
require FILE
file_exists: exists
new_line
FILEput_new_line
FILE
require IO_MEDIUM
extendible: extendible
put (v: like item)
v
SEQUENCE
require COLLECTION
extendible: extendible
ensure COLLECTION
item_inserted: is_inserted (v)
ensure then SEQUENCE
new_count: count = old count + 1
put_character (c: CHARACTER)
c
FILEputchar
FILE
require IO_MEDIUM
extendible: extendible
put_new_line
FILEnew_line
FILE
require IO_MEDIUM
extendible: extendible
put_string (s: STRING)
s
FILEputstring
FILE
require IO_MEDIUM
extendible: extendible
non_void: s /= void
putchar (c: CHARACTER)
c
FILEput_character
FILE
require IO_MEDIUM
extendible: extendible
putstring (s: STRING)
s
FILEput_string
FILE
require IO_MEDIUM
extendible: extendible
non_void: s /= void
remove_permission (who, what: STRING)
whowhat
FILE
require FILE
who_is_not_void: who /= void
what_is_not_void: what /= void
file_descriptor_exists: exists
set_access (time: INTEGER)
time
FILE
require FILE
file_exists: exists
ensure FILE
acess_date_updated: access_date = time
date_unchanged: date = old date
set_date (time: INTEGER)
time
FILE
require FILE
file_exists: exists
ensure FILE
access_date_unchanged: access_date = old access_date
date_updated: date = time
stamp (time: INTEGER)
time
FILE
require FILE
file_exists: exists
ensure FILE
date_updated: date = time
touch
FILE
require FILE
file_exists: exists
ensure FILE
date_changed: date /= old date
feature
delete
FILE
require FILE
exists: exists
dispose
IO_MEDIUM
prune_all (v: like item)
voff
SEQUENCE
require COLLECTION
prunable
ensure COLLECTION
no_more_occurrences: not has (v)
reset (fn: STRING)
fn
FILE
require FILE
valid_file_name: fn /= void
ensure FILE
file_renamed: name = fn
file_closed: is_closed
wipe_out
FILE
require COLLECTION
prunable
require else FILE
is_closed: is_closed
ensure COLLECTION
wiped_out: is_empty
feature
linear_representation: LINEAR [CHARACTER]
LINEAR
feature
lastchar: CHARACTER
read_character
IO_MEDIUM
lastdouble: DOUBLE
read_double
IO_MEDIUM
lastint: INTEGER
read_integer
IO_MEDIUM
lastreal: REAL
read_real
IO_MEDIUM
laststring: STRING
IO_MEDIUM
feature
copy_to (file: like Current)
file
file
FILE
require FILE
file_not_void: file /= void
file_is_open_write: file.is_open_write
current_is_open_read: is_open_read
feature
read_character
last_character
FILEreadchar
FILE
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
read_double
last_double
RAW_FILEreaddouble
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
read_integer
last_integer
RAW_FILEreadint
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
read_line
last_string
last_string
FILEreadline
FILE
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
read_real
last_real
RAW_FILEreadreal
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
read_stream (nb_char: INTEGER)
nb_char
last_string
FILEreadstream
FILE
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
read_word
last_string
FILEreadword
FILE
require FILE
is_readable: file_readable
readchar
last_character
FILEread_character
FILE
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
readdouble
last_double
RAW_FILEread_double
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
readint
last_integer
RAW_FILEread_integer
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
readline
last_string
last_string
FILEread_line
FILE
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
readreal
last_real
RAW_FILEread_real
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
readstream (nb_char: INTEGER)
nb_char
last_string
FILEread_stream
FILE
require IO_MEDIUM
is_readable: readable
require else FILE
is_readable: file_readable
readword
last_string
FILEread_word
FILE
require FILE
is_readable: file_readable
feature
do_all (action: PROCEDURE [ANY, TUPLE [CHARACTER]])
action
action
LINEAR
require TRAVERSABLE
action_exists: action /= void
do_if (action: PROCEDURE [ANY, TUPLE [CHARACTER]]; test: FUNCTION [ANY, TUPLE [CHARACTER], BOOLEAN])
actiontest
actiontest
LINEAR
require TRAVERSABLE
action_exists: action /= void
test_exits: test /= void
for_all (test: FUNCTION [ANY, TUPLE [CHARACTER], BOOLEAN]): BOOLEAN
test
LINEAR
require TRAVERSABLE
test_exits: test /= void
there_exists (test: FUNCTION [ANY, TUPLE [CHARACTER], BOOLEAN]): BOOLEAN
test
LINEAR
require TRAVERSABLE
test_exits: test /= void
feature
put_boolean (b: BOOLEAN)
b
RAW_FILEputbool
require IO_MEDIUM
extendible: extendible
put_double (d: DOUBLE)
d
RAW_FILEputdouble
require IO_MEDIUM
extendible: extendible
put_integer (i: INTEGER)
i
RAW_FILEputint
require IO_MEDIUM
extendible: extendible
put_real (r: REAL)
r
RAW_FILEputreal
require IO_MEDIUM
extendible: extendible
putbool (b: BOOLEAN)
b
RAW_FILEput_boolean
require IO_MEDIUM
extendible: extendible
putdouble (d: DOUBLE)
d
RAW_FILEput_double
require IO_MEDIUM
extendible: extendible
putint (i: INTEGER)
i
RAW_FILEput_integer
require IO_MEDIUM
extendible: extendible
putreal (r: REAL)
r
RAW_FILEput_real
require IO_MEDIUM
extendible: extendible
invariant
not_plain_text: not is_plain_text
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
FILE
valid_mode: closed_file <= mode and mode <= append_read_file
name_exists: name /= void
name_not_empty: not name.is_empty
FINITE
empty_definition: is_empty = (count = 0)
non_negative_count: count >= 0
ACTIVE
writable_constraint: writable implies readable
empty_constraint: is_empty implies (not readable) and (not writable)
BILINEAR
not_both: not (after and before)
before_constraint: before implies off
LINEAR
after_constraint: after implies off
TRAVERSABLE
empty_constraint: is_empty implies off
indexing
library: "[
EiffelBase: Library of reusable components for Eiffel.
]"
status: "[
Copyright 1986-2001 Interactive Software Engineering (ISE).
For ISE customers the original versions are an ISE product
covered by the ISE Eiffel license and support agreements.
]"
license: "[
EiffelBase may now be used by anyone as FREE SOFTWARE to
develop any product, public-domain or commercial, without
payment to ISE, under the terms of the ISE Free Eiffel Library
License (IFELL) at http://eiffel.com/products/base/license.html.
]"
source: "[
Interactive Software Engineering Inc.
ISE Building
360 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Electronic mail <info@eiffel.com>
Customer support http://support.eiffel.com
]"
info: "[
For latest info see award-winning pages: http://eiffel.com
]"
end -- RAW_FILE